Re: Strange difference in query execution time

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeremy Jongsma <jeremy(at)jongsma(dot)org>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange difference in query execution time
Date: 2004-08-27 18:25:05
Message-ID: 1151.1093631105@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jeremy Jongsma <jeremy(at)jongsma(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message borajetta 2004-08-27 18:40:53 Which Order Vacuum Full Analyze Cluster Reindex?
Previous Message Joseph Shraibman 2004-08-27 18:13:03 Re: performance of IN (subquery)