Re: sequence skips 30 values, how?
| От | Jorge Godoy |
|---|---|
| Тема | Re: sequence skips 30 values, how? |
| Дата | |
| Msg-id | 877iv2ngs4.fsf@gmail.com обсуждение исходный текст |
| Ответ на | Re: sequence skips 30 values, how? ("Angva" <angvaw@gmail.com>) |
| Список | pgsql-general |
"Angva" <angvaw@gmail.com> writes: > As others have said, sequences can have gaps. In fact, the thought of > a gap-free sequence is scary to me. Unless you do very few inserts, > "gap-free sequence" is pretty much synonymous with "not scalable". If > your goal is to generate a unique number for each row (which is > usually the case), then gaps should be fine. > > Though I must admit I have occasionally wished for sequences with a > GAPFREE option...For small, static look-up tables that I update once > in a blue moon. It's just easier on the eyes to have 1,2,3,4,5 than 1, > 25, 2405, 95720, 59028598253. There's a recipe for gapless sequences on Varlena (if you can access it from your end...) that was the result of discussions here. There's a performance hit, of course, but it works. -- Jorge Godoy <jgodoy@gmail.com>
В списке pgsql-general по дате отправления: