Thread: Slow select query

Slow select query

From
Glenn Pierce
Date:
Hi I have a query that returns a fair amount of data ~ 730000 rows.
In pgadmin The query after multiple runs takes around 5-6 seconds.

When  try to get all the data through psycopg it takes around 20 seconds.

I have turned of ssl for postgres.

Does anyone no any reasons why this is or is this normal behavior ?

Thanks

Re: Slow select query

From
Adrian Klaver
Date:
On 03/31/2014 01:10 PM, Glenn Pierce wrote:
> Hi I have a query that returns a fair amount of data ~ 730000 rows.
> In pgadmin The query after multiple runs takes around 5-6 seconds.
>
> When  try to get all the data through psycopg it takes around 20 seconds.
>
> I have turned of ssl for postgres.
>
> Does anyone no any reasons why this is or is this normal behavior ?

Are running this under the same circumstances?
In other words are pgAdmin and your psycopg code on the same machine
pointing at the same server?

Also what is your psycopg code doing besides running the query, if anything?

Lastly how are measuring completion in each case?

>
> Thanks


--
Adrian Klaver
adrian.klaver@aklaver.com