X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0BFE49FB1B9 for ; Tue, 6 Jun 2006 18:11:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 59310-01 for ; Tue, 6 Jun 2006 18:11:19 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id E925E9FA13E for ; Tue, 6 Jun 2006 18:11:19 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k56LBEss023271; Tue, 6 Jun 2006 17:11:14 -0400 (EDT) To: Scott Marlowe cc: "Jim C. Nasby" , "Craig A. James" , pgsql-performance@postgresql.org Subject: Re: Some queries starting to hang In-reply-to: <1149627741.25526.224.camel@state.g2switchworks.com> References: <1149534308.3583.56.camel@bg002441.pro-unlimited.com> <22706.1149538039@sss.pgh.pa.us> <20060605203851.GB7071@phlogiston.dyndns.org> <23915.1149541591@sss.pgh.pa.us> <1149604741.2621.487.camel@localhost.localdomain> <17148.1149605005@sss.pgh.pa.us> <1149605576.2621.502.camel@localhost.localdomain> <17426.1149606369@sss.pgh.pa.us> <4485C061.2080206@modgraph-usa.com> <1149616467.25526.213.camel@state.g2switchworks.com> <20060606205117.GB45331@pervasive.com> <1149627741.25526.224.camel@state.g2switchworks.com> Comments: In-reply-to Scott Marlowe message dated "Tue, 06 Jun 2006 16:02:21 -0500" Date: Tue, 06 Jun 2006 17:11:14 -0400 Message-ID: <23270.1149628274@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/72 X-Sequence-Number: 19429 Scott Marlowe 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