The basic syntax for creating a sequence generator for oracle database table attribute is:
CREATE SEQUENCE customers_seq
START WITH 1000
INCREMENT BY 1
NOCACHE
NOCYCLE;
I would like to know what does the NOORDER clause in the SEQUENCE syntax do? If I include the NOORDER clause, will it give me a sequence keeping the increment value random???
This is important when running in parallel server mode or in a cluster. ORDER guarantees that the sequences numbers are ordered.
NOORDER in combination with CACHING sequences results in this behavior. ORDER effectively makes the CACHE setting unused. With caching set to 10 when a session gets a sequences it takes 10 sequences into it’s cache.