Skip site navigation (1) Skip section navigation (2)

NOTIFY performance

From: Artur Zając <azajac(at)ang(dot)com(dot)pl>
To: <pgsql-performance(at)postgresql(dot)org>
Subject: NOTIFY performance
Date: 2012-08-24 18:46:42
Message-ID: 002401cd8228$ce80e970$6b82bc50$ (view raw, whole thread or download thread mbox)
Lists: pgsql-performance

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

I'v tested with 50000 of NOTICES. Updating table with 20000 NOTICES when
searching is not performed took 1,5 second. With searching it took 28

Artur Zajac


pgsql-performance by date

Next:From: Merlin MoncureDate: 2012-08-24 19:12:05
Subject: Re: NOTIFY performance
Previous:From: Shaun ThomasDate: 2012-08-24 16:20:21
Subject: Loose Index Scans by Planner?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group