Re: NOTIFY performance

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: NOTIFY performance
Дата
Msg-id CAMkU=1x-6Q2gG6muiUWHzoUkYMQePS52hds6D=VjF3RvxppT5g@mail.gmail.com
обсуждение исходный текст
Ответ на NOTIFY performance  (Artur Zając <azajac@ang.com.pl>)
Ответы Re: NOTIFY performance
Список pgsql-performance
On Fri, Aug 24, 2012 at 11:46 AM, Artur Zając <azajac@ang.com.pl> wrote:
> Hello,
>
>
> I would like to create some application using triggers and LISTEN/NOTIFY
> framework. I've tested it, and I noticed that performance of NOTIFY
> significally decreases with increasing number of distinct NOTIFIES in
> transaction.
> I found that function AsyncExistsPendingNotify is responsibe for it. I think
> that complexivity of searching duplicates there is O(N^2). Would be possible
> to improve performance of it? Maybe by using list for elements precedence
> and binary search tree for searching duplicates - with complexivity of
> O(Nlog2(N)).

I wonder if should be trying to drop duplicates at all.  I think that
doing that made a lot more sense before payloads existed.

The docs said that the system "can" drop duplicates, so making it no
longer do so would be backwards compatible.

Maybe drop duplicates where the payload was the empty string, but keep
them otherwise?

Cheers,

Jeff


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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: exponential performance decrease in ISD transaction
Следующее
От: Tom Lane
Дата:
Сообщение: Re: NOTIFY performance