Re: Does EXPLAIN ANALYZE show a wrong plan for MIN/MAX? - Mailing list pgsql-hackers

From Matteo Beccati
Subject Re: Does EXPLAIN ANALYZE show a wrong plan for MIN/MAX?
Date
Msg-id 4374B226.1090106@beccati.com
Whole thread Raw
In response to Re: Does EXPLAIN ANALYZE show a wrong plan for MIN/MAX?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
>> On Fri, Nov 11, 2005 at 11:05:45AM +0100, Matteo Beccati wrote:
>>> It seems that the plan outputted is not the optimized one (available
>>> since 8.1) that is really used when running the plain query.
> 
>> It may also be that the overhead of calling gettimeofday() several
>> times per tuple is blowing the time out. What platform is this?
> 
> Martijn's explanation is by far the more probable.  The high overhead
> of EXPLAIN ANALYZE has been documented before.

OK, I've had the same explaination on IRC by dennisb, but I thought it 
was strange to have a 15x slowdown.

So, does benchmarking queries using explain analyze lead to unreliable 
results? Shouldn't a min/max query use a index scan when possible?


Best regards
--
Matteo Beccati
http://phpadsnew.com
http://phppgads.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Does EXPLAIN ANALYZE show a wrong plan for MIN/MAX?
Next
From: Tom Lane
Date:
Subject: Re: 8.1 substring bug?