Re: Using a single sequence for all tables
От | Tobias Meyer |
---|---|
Тема | Re: Using a single sequence for all tables |
Дата | |
Msg-id | CAAEpUZmfAbEOmApLBHf6vMr_gguCX+Kc3aBhK81oPiOfzH+08A@mail.gmail.com обсуждение исходный текст |
Ответ на | Using a single sequence for all tables ("Peter J. Holzer" <hjp-pgsql@hjp.at>) |
Ответы |
Re: Using a single sequence for all tables
|
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: