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

Re: PQisBusy() always busy

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: bradg <bg4all(at)me(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: PQisBusy() always busy
Date: 2011-09-14 14:55:08
Message-ID: CAHyXU0zppGU21hxnEwtK9pGmoXtfP8Wg7hKHfGFGNWNrNGXMVg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Tue, Sep 13, 2011 at 7:50 PM, bradg <bg4all(at)me(dot)com> wrote:
> Thanks for your thoughtful, detailed response. I also took your warnings to
> heart and resolved the underlying problem in my code without resorting to
> threads. I have both the blocking and nonblocking functions working without
> any issues.
>
> Except one. Speed.
>
> When I use the blocking function on a select query for 102 records, the time
> is 0.645284 seconds. When I use the nonblocking version, the time is
> 52.000426 seconds. The application pgAdmin3 takes 1.6 seconds.
>
> Does that seem right?

It does not.  In fact, if you look at the internal libpq code, you'll
notice that they all run through the same internal call -- something
is amiss. What happens when you immediately try to get the result
after sending the query?

merlin

In response to

pgsql-novice by date

Next:From: roxDate: 2011-09-14 18:50:13
Subject: What type is required to capture the RETURNING from an Update?
Previous:From: roxDate: 2011-09-14 13:44:49
Subject: Can I capture created key id's, work with them, then return them later?

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