Re: Some queries starting to hang

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
Cc: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, "Craig A(dot) James" <cjames(at)modgraph-usa(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Some queries starting to hang
Date: 2006-06-06 21:11:14
Message-ID: 23270.1149628274@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Scott Marlowe <smarlowe(at)g2switchworks(dot)com> writes:
> The cost of not aborting on the first sort is that you may never see
> what the part of the plan is that's killing your query, since you never
> get the actual plan.

Well, you can get the plan without waiting a long time; that's what
plain EXPLAIN is for. But I still disagree with the premise that you
can extrapolate anything very useful from an unfinished EXPLAIN ANALYZE
run. As an example, if the plan involves setup steps such as sorting or
loading a hashtable, cancelling after a minute might make it look like
the setup step is the big problem, distracting you from the possibility
that the *rest* of the plan would take weeks to run if you ever got to
it.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2006-06-06 21:14:48 Re: Some queries starting to hang
Previous Message Scott Marlowe 2006-06-06 21:02:21 Re: Some queries starting to hang