From: | "Gregory S(dot) Williamson" <gsw(at)globexplorer(dot)com> |
---|---|
To: | "Robert Davis" <robert(at)faithwestinc(dot)com>, <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: explain analyze results are different for each iteration |
Date: | 2004-09-15 01:33:11 |
Message-ID: | 71E37EF6B7DCC1499CEA0316A256832801D4B7D4@loki.wc.globexplorer.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Are you forcing stuff out of cache (both postgres and OS) ? I've found that this can make a huge difference with some queries ... not sure that this would make it have different plans, though.
My ill-informied $0.02 worth ... fwiw
Greg Williamson
DBA
GlobeXplorer LLC
-----Original Message-----
From: Robert Davis [mailto:robert(at)faithwestinc(dot)com]
Sent: Tue 9/14/2004 6:21 PM
To: pgsql-sql(at)postgresql(dot)org
Cc:
Subject: [SQL] explain analyze results are different for each iteration
I'm trying to benchmark some complex sql queries. One query, in
particular, is causing problems -- its cost values can vary from 228
to 907, its Total Runtimes from 60 ms to 5176 ms. The query plans
show that the optimizer is choosing different plans for different
iterations of the same query. Does anyone have any idea what's
going on here or maybe how I can force Postgres to prefer the faster
plan?
The query plans are very long (11 tables joined) but I can include
them if it might help. Thanks for any advice,
Roberto
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2004-09-15 02:07:17 | Re: explain analyze results are different for each iteration |
Previous Message | Robert Davis | 2004-09-15 01:21:27 | explain analyze results are different for each iteration |