Re: select/update performance?

Поиск
Список
Период
Сортировка
От Bjørn T Johansen
Тема Re: select/update performance?
Дата
Msg-id 1068030159.12114.27.camel@pgsqlsrv.havleik.no
обсуждение исходный текст
Ответ на Re: select/update performance?  (Rob Fielding <rob@dsvr.net>)
Список pgsql-general
Ok you all, I cave... I will use sequences.... :)

BTJ

On Wed, 2003-11-05 at 11:46, Rob Fielding wrote:
> Bjørn T Johansen wrote:
> > Yes, but the table in question have 3 PK and only one that needs this
> > "sequence" so I just thought instead of getting holes in the IDs I just
> > manually handle this counter somehow.. Not a big deal but... :)
>
> You'd only get holes if you keep making nextval requests without using
> the value - say by issuing rollback. The problem with holes is actually
> the feature of uniqueness SEQUENCES provides. Perhaps you judge that
> there is too high a chance of rollback to create a sufficient number of
> holes to warrant not using a SEQUENCE.
>
> It's all down to your application and specific situation I guess however
> your counter table idea sounds exactly like what SEQUENCE provides,
> without any of the guarantees.
>
> I think I'd still recommend using a SEQUENCE for anything but the most
> profound reason :)


В списке pgsql-general по дате отправления:

Предыдущее
От: Rob Fielding
Дата:
Сообщение: Re: select/update performance?
Следующее
От: Dave Smith
Дата:
Сообщение: System crash and trying to run vacuum getting errors