Teradata is a MPP system, so data is distributed and processed in parallel. So this is implemented differently-
In easy words: To become not sequencial the identity process is done Vproc specific and each vproc is requesting a number range. So you will not get a closed number range if you insert data to a table.
Something like
1. insert creates ID 1001
2. insert creates ID 2001
3. insert creates ID 2002
4. insert creates ID 1
5. insert creates ID 1002
so not a single system variable can hold the latest id or you would break the parallelism.
Check also the manuals and there exists a lot of posts here or in www.teradataforum.com
Do you do bulk inserts or sequential?
Consider to do the id generation with SQL and maintain a last_id in a generic reference table
↧