Support Questions
Find answers, ask questions, and share your expertise

Why does Apache Phoenix sequence not start from 1.


I have an apache phoenix sequence field which is defind as:


When i insert data by, then, the COUNT start from 1.

if i insert data by JDBC template, the COUNT will start from 101, 201. It automatically append 01 at the end of the COUNT.

How can i fix this issue?


Super Guru

@Bin Ye

I can only guess here but 100 sequence numbers are cached by client. S, if you run "" first, it will cache 100 sequences and a new client will start from next sequence which is 101. This is what is likely going on. The only other explanation is that your CREATE SEQUENCE statement conatins "STARTS WITH 101" which I think it doesn't.

Change the following value to 50 and see if your jdbc value starts with 51?

; ;