Re: Performance of the listen command

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: Performance of the listen command
Дата
Msg-id 20060729024304.GA45736@winnie.fuhr.org
обсуждение исходный текст
Ответ на Re: Performance of the listen command  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: Performance of the listen command  (Flemming Frandsen <ff@partyticket.net>)
Список pgsql-general
On Fri, Jul 28, 2006 at 10:09:00PM -0400, Alvaro Herrera wrote:
> Flemming Frandsen wrote:
> > The strange thing is that just about any query runs in 1-4ms, but the
> > listen command, which shouldn't even have to touch the disk takes around
> > 60ms.
>
> Actually, it does write to disk, because the listen information is kept
> on a table.

Also, based on a 60ms-per-listen time I suspect you're not doing
the listens in a transaction, so each listen is its own transaction
that has to be committed, resulting in a disk hit.  Try doing them
all in one transaction.

--
Michael Fuhr

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Performance of the listen command
Следующее
От: Flemming Frandsen
Дата:
Сообщение: Re: Performance of the listen command