Re: Using NOTIFY... Slow Client Querys

From: Joe Lester <joe_lester(at)sweetwater(dot)com>
To: Mikhail Terekhov <terekhov(at)emc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using NOTIFY... Slow Client Querys
Date: 2004-02-17 13:21:33
Message-ID: 34555D1A-614C-11D8-AFDF-000A95A58EA0@sweetwater.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks. I was kind of suspecting that. But it's nice to have it
confirmed.

I might try a random delay on the client side after receiving the
notification, before I query. That may help to break up the load on the
server.

On Feb 16, 2004, at 10:27 AM, Mikhail Terekhov wrote:
> I'd say it is related to the design of the application. Imagine what
> happens:
>
> 1. You have 140 backends, most/all of them are sleeping.
> 2. One client sends a NOTIFY.
> 3. All 140 backends get awake all together and send a notify message
> to their clients.
> 4. All 140 clients almost at the same time send a query to the same
> table.
> 5. Unless you have a _very_ powerful server it will be _very_ slow.
>
> It is a classical multitask bottleneck problem.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Edmund Zynda 2004-02-17 13:55:12 unsubscribe
Previous Message Joe Lester 2004-02-17 13:17:15 Re: Using NOTIFY... Slow Client Querys