CockroachDB is generating big ids when records are inserted via spring

65 views Asked by At

I am creating an application that uses cockroachDB but when I insert any new record , cockroachDB generates very big ids like '600372119629037569', is there a way to shorten these Ids?

1

There are 1 answers

0
rafiss On

You can try setting the serial_normalization setting to sql_sequence. Just be aware that this can decrease performance. Is it important for the IDs to be small?

See: https://www.cockroachlabs.com/docs/stable/serial.html#modes-of-operation