Re: Some queries starting to hang

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
Cc: "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 20:51:17
Message-ID: 20060606205117.GB45331@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Jun 06, 2006 at 12:54:27PM -0500, Scott Marlowe wrote:
> On Tue, 2006-06-06 at 12:50, Craig A. James wrote:
> > Tom Lane wrote:
> > >>The idea I just had was: why do we need EXPLAIN ANALYZE to run to
> > >>completion? In severe cases like this thread, we might be able to
> > >>discover the root cause by a *partial* execution of the plan, as long as
> > >>it was properly instrumented. That way, the OP might have been able to
> > >>discover the root cause himself...
> > >
> > >
> > > I don't think that helps, as it just replaces one uncertainty by
> > > another: how far did the EXPLAIN really get towards completion of the
> > > plan? You still don't have any hard data.
> >
> > But at least you have some data, which is better than no data. Even knowing that the plan got stuck on a particular node of the query plan could be vital information. For a query that never finishes, you can't even find out where it's getting stuck.
> >
> > That's why Simon's proposal might help in some particularly difficult situations.
>
> Hmmmmm. I wonder if it be hard to have explain analyze have a timeout
> per node qualifier? Something that said if it takes more than x
> milliseconds for a node to kill the explain analyze and list the up to
> the nasty node that's using all the time up?
>
> That would be extremely useful.

Maybe, maybe not. It would be very easy for this to croak on the first
sort it hits. I suspect the original proposal of aborting once a
rowcount estimate proves to be way off is a better idea.

For the record, I also think being able to get a current snapshot is
great, too.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Scott Marlowe 2006-06-06 21:02:21 Re: Some queries starting to hang
Previous Message Mischa Sandberg 2006-06-06 19:38:09 Re: vacuuming problems continued