Search Postgresql Archives

Re: Using a single sequence for all tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Possible drawbacks:

 * The ids will grow faster, and they will be large even on small
   tables. It may be a bit irritating if you have a table with just 5
   rows and the ids are 5, 6, 7, 12654, 345953.
 * Bottleneck? Using a single sequence was said to be a performance
   bottleneck in Oracle. I didn't notice a performance difference then
   and I doubt it would be one in PostgreSQL, but if in doubt, measure!
 * Doesn't work with IDENTIY - those columns always use implicit
   sequences.
 * currval() is pretty useless with a global sequence. But I basically
   never use that anyway.

* you will have to pay attention to rollover/overflow situations more quickly. 
 
Just my 2 cent.
Tobias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux