Re: Locking to restrict rowcounts.

Поиск
Список
Период
Сортировка
От Shakil Shaikh
Тема Re: Locking to restrict rowcounts.
Дата
Msg-id BAY117-DS2FA41FF1E6792B93F4E85AC5B0@phx.gbl
обсуждение исходный текст
Ответ на Locking to restrict rowcounts.  ("Shakil Shaikh" <sshaikh@hotmail.com>)
Список pgsql-general
--------------------------------------------------
From: "Richard Huxton" <dev@archonet.com>
>
> Of course, if you're going to have a separate table then you might as well
> store the count in there and actually update it on every
> insert/update/delete. Assuming you might find the count of some use
> somewhere. Set the fill-factor for the lock table and HOT should prevent
> the table bloating too.
>

I think

PERFORM * FROM items WHERE owner = name FOR UPDATE;

sounds like it should work the best. What are the downsides for this that
would require the further table of counts? FWIW items has a SERIAL primary
key so FOR UPDATE should work on it.

Shak


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

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Direct I/O and postgresql version
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Get block of N numbers from sequence