Re: Strange difference in query execution time - Mailing list pgsql-general

From Tom Lane
Subject Re: Strange difference in query execution time
Date
Msg-id 1151.1093631105@sss.pgh.pa.us
Whole thread Raw
In response to Strange difference in query execution time  (Jeremy Jongsma <jeremy@jongsma.org>)
List pgsql-general
Jeremy Jongsma <jeremy@jongsma.org> writes:
> My questions are:

> 1) How can #3 take 30 times as long as #2, given that in my databse they
> have the exact same number of rows returned and are drawn from the exact
> same tables?
> 2) How is it possible for #3, a subset of #1 with a very simple WHERE
> clause, to take three times longer than #1 to execute?

> I can provide table definitions if needed.

What would be more useful is EXPLAIN ANALYZE output (and you have
ANALYZEd all the underlying tables, no?).  This is a bit off topic
for pgsql-general though, please take it to pgsql-performance.

            regards, tom lane

pgsql-general by date:

Previous
From: Joseph Shraibman
Date:
Subject: Re: performance of IN (subquery)
Next
From: Tom Lane
Date:
Subject: Re: performance of IN (subquery)