Re: High activity short table and locks

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: High activity short table and locks
Дата
Msg-id 4886F0BC.6050801@archonet.com
обсуждение исходный текст
Ответ на High activity short table and locks  ("Guillaume Bog" <guibog@gmail.com>)
Ответы Re: High activity short table and locks  ("Guillaume Bog" <guibog@gmail.com>)
Список pgsql-general
Guillaume Bog wrote:
> It seems I'm a bit stuck here. I'd appreciate some help. My main general
> question is "how to handle very small but hot status table that has to be
> updated every 30 seconds by 100 different persons, read and updated from
> many sides, and also joined with some more common tables (i.e. much larger
> but less hot)"

Remove all indexes except the one backing the primary-key. Run a VACUUM
  FULL and REINDEX or CLUSTER the table. Vacuum *very frequently* -
you'll want custom values in pg_autovacuum. Add indexes back one at a
time to see what's really necessary. If you can keep the dead rows to a
reasonable level, I'd have thought you could get by without indexes.

You might want to consider setting synchronous_commit=off for updates to
the table. I'm assuming the information in the table isn't vital in the
event of a system crash, and that could reduce WAL activity if you're
limited by disk bandwidth.

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Klint Gore
Дата:
Сообщение: Re: Substitute a variable in PL/PGSQL.
Следующее
От: Emil Pedersen
Дата:
Сообщение: Re: inconsistent program behavior, fresh eyes needed