Re: That EXPLAIN ANALYZE patch still needs work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: That EXPLAIN ANALYZE patch still needs work
Date: 2006-06-07 20:04:33
Message-ID: 16947.1149710673@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> Anyway, as a test, if you take the approach that the measurement at
> item X only applies to the tuples immediately preceding it, for the
> data you posted you get a result of 0.681148 seconds. How long did that
> query run that produced that data?

I didn't save the corresponding printout unfortunately, but it was
probably pretty similar to this:

regression=# explain analyze select count(*) from (select * from tenk1 a join tenk1 b on a.unique1 = b.unique2 offset 0) ss;
QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=2609.00..2609.01 rows=1 width=0) (actual time=869.395..869.399 rows=1 loops=1)
-> Limit (cost=825.00..2484.00 rows=10000 width=488) (actual time=248.640..3368.313 rows=10000 loops=1)
-> Hash Join (cost=825.00..2484.00 rows=10000 width=488) (actual time=248.609..2983.528 rows=10000 loops=1)
Hash Cond: (a.unique1 = b.unique2)
-> Seq Scan on tenk1 a (cost=0.00..458.00 rows=10000 width=244) (actual time=0.084..21.525 rows=10000 loops=1)
-> Hash (cost=458.00..458.00 rows=10000 width=244) (actual time=248.269..248.269 rows=10000 loops=1)
-> Seq Scan on tenk1 b (cost=0.00..458.00 rows=10000 width=244) (actual time=0.025..22.760 rows=10000 loops=1)
Total runtime: 877.265 ms
(8 rows)

Time: 888.469 ms
regression=#

The above idea won't fix it anyway, only move the failure cases around.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2006-06-07 20:14:27 Re: ADD/DROP INHERITS
Previous Message Martijn van Oosterhout 2006-06-07 19:59:06 Re: That EXPLAIN ANALYZE patch still needs work