pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dave Page <dpage@postgresql.org>
To: Rainer Bauer <usenet@munnin.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Data transfer very slow when connected via DSL
Date: Fri, 22 Jun 2007 11:12:48 +0100
Message-ID: <467BA0A0.1080809@postgresql.org> (raw)
In-Reply-To: <bq3n73t5u9i3o7bh3lbfqftee0aabaf35l@4ax.com>
References: <s7tk73d57kvb3f4ph1kmkvhdfe0kak5a1r@4ax.com>
	<7be3f35d0706210801p732f2e73o147e3cbc0dc98153@mail.gmail.com>
	<d1el7392q4eab7uqud2ci3ihn2fqkusjms@4ax.com>
	<24rl73d5td717rimunndjnjghfl1pgqojh@4ax.com>
	<10461.1182477071@sss.pgh.pa.us>
	<bq3n73t5u9i3o7bh3lbfqftee0aabaf35l@4ax.com>

Rainer Bauer wrote:
>> It's not immediately clear why pgAdmin would have the same issue,
>> though, because AFAIK it doesn't rely on ODBC.
> 
> No it doesn't. That's the reason I used it to verify the behaviour.
> 
> But I remember Dave Page mentioning using a virtual list control to display
> the results and that means a round trip for every tuple.

pgAdmin's Query Tool (which I assume you're using), uses an async query 
via libpq to populate a virtual table behind the grid. The query 
handling can be seen in pgQueryThread::execute() at 
http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/trunk/pgadmin3/pgadmin/db/pgQueryThread.cpp?rev=6082&...

When the query completes, a dataset object (basically a wrapper around a 
PGresult) is attached to the grid control. As the grid renders each 
cell, it requests the value to display which results in a call to 
PQgetValue. This is how the old display time was eliminated - cells are 
only rendered when they become visible for the first time, meaning that 
the query executes in pgAdmin in the time it takes for the async query 
to complete plus (visible rows * visible columns)PQgetValue calls.

> I don't think it's a Windows-specific problem, because psql is doing the job
> blindingly fast. The problem lies in the way my application is coded. See the
> response to Dimitri for details.

I don't see why pgAdmin should be slow though - it should be only 
marginally slower than psql I would think (assuming there are no thinkos 
in our code that none of use ever noticed).

Regards, Dave.



view thread (27+ messages)  latest in thread

Message-ID: <467BA0A0.1080809@postgresql.org>
Permalink:  ../467BA0A0.1080809@postgresql.org/
Also on:    postgresql.org/message-id/467BA0A0.1080809@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: dpage@postgresql.org, usenet@munnin.com
  Subject: Re: Data transfer very slow when connected via DSL
  In-Reply-To: <467BA0A0.1080809@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox