Re: Performance of the listen command

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Performance of the listen command
Дата
Msg-id 20060729020900.GA6558@surnet.cl
обсуждение исходный текст
Ответ на Performance of the listen command  (Flemming Frandsen <ff@partyticket.net>)
Ответы Re: Performance of the listen command  (Michael Fuhr <mike@fuhr.org>)
Список pgsql-general
Flemming Frandsen wrote:
> I cache a lot of data in the application, to invalidate that cache I
> have triggers that use notify to let new transactions eject the objects
> from the cache.
>
> My problem with listen is that when I start a new connection I run a
> listen command for each of my tables, that loop takes around 10 seconds
> to complete and I have around 150 tables.

Do you regularly vacuum the pg_listener table?

> 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.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

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

Предыдущее
От: Reece Hart
Дата:
Сообщение: Re: copy losing information
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Performance of the listen command