Re: EXPLAIN ANALYZE

From: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: EXPLAIN ANALYZE
Date: 2006-12-10 13:00:06
Message-ID: 1165755606.3839.782.camel@silverbirch.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2006-12-08 at 10:42 -0500, Tom Lane wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> > My understanding from 8.2 development was that EXPLAIN ANALYZE had been
> > altered so that if you issued a particular keystroke while it was
> > executing you'd get a partial results-so-far version of the EXPLAIN.
>
> Ways to get partial results from EXPLAIN were speculated about, but
> AFAIR no specific design was agreed to, much less implemented.

Well, I'd like a way of making EXPLAIN ANALYZE return something useful
within a reasonable amount of time. We can define that as the amount of
time that the user considers is their goal for the query. Having an EA
that goes on forever and ever doesn't really help anyone diagnose
problems with long running queries.

With that requirement in mind, how about something simple like:

explain_analyze_timeout = n

When timeout is reached the EA returns results as if it had finished
executing normally, though with some additional text to make it very
clear that the displayed results are partial execution only. Implemented
over the top of statement_timeout, but without throwing an error.

I'm not very sure about that idea, but it meets the requirement.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2006-12-10 14:28:23 Re: EXPLAIN ANALYZE
Previous Message Simon Riggs 2006-12-10 12:57:01 Re: [HACKERS] Configuring BLCKSZ and XLOGSEGSZ (in 8.3)