Re: Data transfer very slow when connected via DSL

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Data transfer very slow when connected via DSL
Дата
Msg-id 467BA0A0.1080809@postgresql.org
обсуждение исходный текст
Ответ на Re: Data transfer very slow when connected via DSL  (Rainer Bauer <usenet@munnin.com>)
Ответы Re: Data transfer very slow when connected via DSL  (Dave Page <dpage@postgresql.org>)
Список pgsql-performance
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&view=markup

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.

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

Предыдущее
От: Rainer Bauer
Дата:
Сообщение: Re: Data transfer very slow when connected via DSL
Следующее
От: Dave Page
Дата:
Сообщение: Re: Data transfer very slow when connected via DSL