A sequence is a memory resident counter for records, if you had to find the maximum disk record and increment it by One and write your record out to disk, there would be massive Disk I/O, by keeping a sequence in RAM, you speed up making new records quite a lot, and your users rarely have to wait on each other.
Just once per key, you create sequence, then you use the sequence in insert (primary_key_value) values (my_key.netval); (real tables will have more columns) I love everyone til they prove otherwise, sadly some prove otherwise SO quickly
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.