explain analyze results are different for each iteration - Mailing list pgsql-sql

From Robert Davis
Subject explain analyze results are different for each iteration
Date
Msg-id 41479917.7010305@faithwestinc.com
Whole thread Raw
Responses Re: explain analyze results are different for each iteration  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: andrew@pillette.com
Date:
Subject: Re: CREATE RULE ignored, what did I do wrong
Next
From: "Gregory S. Williamson"
Date:
Subject: Re: explain analyze results are different for each iteration