Hi,
I need to modify the value for the column session_cache_count for some of the sequences .
I tried to execute the following script -
ALTER SEQUENCE <<SEQUENCE_NAME>> SET session_cache_count = 1;
while doing so I am getting the below error -
[--SELECT - 0 row(s), 0.000 secs] [Error Code: 4856, SQL State: 42601] [Vertica][VJDBC](4856) ERROR: Syntax error at or near "session_cache_count"
... 1 statement(s) executed, 0 row(s) affected, exec/fetch time: 0.000/0.000 sec [0 successful, 0 warnings, 1 errors]
Can you let me know the correct syntax to change the value.
Regards,
Samuel
Alter Sequence
Moderator: NorbertKrupa
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: Alter Sequence
I do not think you can change the value of session_cache_count. It is just a reflection of the cache value.
By the way, I wouldn't use a CACHE size of 1 as you will get terrible performance from it... The minimum I would use is 500. But if you are inserting millions of rows, I'd leave it at 250,000 (the default).
Code: Select all
dbadmin=> CREATE SEQUENCE jim CACHE 10;
CREATE SEQUENCE
dbadmin=> SELECT session_cache_count FROM sequences WHERE sequence_name = 'jim';
session_cache_count
---------------------
10
(1 row)
dbadmin=> ALTER SEQUENCE jim CACHE 20;
ALTER SEQUENCE
dbadmin=> SELECT session_cache_count FROM sequences WHERE sequence_name = 'jim';
session_cache_count
---------------------
20
(1 row)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
-
- Newbie
- Posts: 5
- Joined: Thu Mar 26, 2015 4:45 pm