can I flush the cache of a sequence without logout a session
we run ETL in parallel against Vertica database.
there is a sequence name S1 start with 1 cache 1000
step 1:
at time 00:01:00 in session 1. we run a sql as below:
insert into T1(ID, name, desc) select S1.nextval, name, desc from T2; it will insert 200 records.
step 2:
at time 00:02:00 in session 2, we run the same sql as below:
insert into T1(ID, name, desc) select S1.nextval, name, desc from T2; it will insert 2300 records.
step 3:
at time 00:05:00 in session 1, we run the same sql again as below:
insert into T1(ID, name, desc) select S1.nextval, name, desc from T2; it will insert 300 records.
I notice that we get the smaller ID at step 3 then what we get at step 2, although we run the sql in 3 minutes later.
I know that I can set the sequence no cache to avoid this issue. But it would raise another performance issue.
how can I get the bigger sequence number which I call it later? I mean don't logout the sessions.
I wonder if we can flush the cache of a sequence without logout the session?
there is a sequence name S1 start with 1 cache 1000
step 1:
at time 00:01:00 in session 1. we run a sql as below:
insert into T1(ID, name, desc) select S1.nextval, name, desc from T2; it will insert 200 records.
step 2:
at time 00:02:00 in session 2, we run the same sql as below:
insert into T1(ID, name, desc) select S1.nextval, name, desc from T2; it will insert 2300 records.
step 3:
at time 00:05:00 in session 1, we run the same sql again as below:
insert into T1(ID, name, desc) select S1.nextval, name, desc from T2; it will insert 300 records.
I notice that we get the smaller ID at step 3 then what we get at step 2, although we run the sql in 3 minutes later.
I know that I can set the sequence no cache to avoid this issue. But it would raise another performance issue.
how can I get the bigger sequence number which I call it later? I mean don't logout the sessions.
I wonder if we can flush the cache of a sequence without logout the session?
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.