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 DDC5C9FA2E6 for ; Tue, 6 Jun 2006 12:38:19 -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 13694-06 for ; Tue, 6 Jun 2006 12:38:14 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from stark.xeocode.com (stark.xeocode.com [216.58.44.227]) by postgresql.org (Postfix) with ESMTP id 567499F9316 for ; Tue, 6 Jun 2006 12:38:13 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=stark.xeocode.com) by stark.xeocode.com with smtp (Exim 3.36 #1 (Debian)) id 1Fndco-0000J7-00; Tue, 06 Jun 2006 11:37:47 -0400 To: Simon Riggs Cc: Tom Lane , Andrew Sullivan , pgsql-performance@postgresql.org Subject: Re: Some queries starting to hang 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> In-Reply-To: <1149605576.2621.502.camel@localhost.localdomain> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 06 Jun 2006 11:37:46 -0400 Message-ID: <87ejy29tx1.fsf@stark.xeocode.com> Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/61 X-Sequence-Number: 19418 Simon Riggs writes: > 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... An alternate approach would be to implement a SIGINFO handler that prints out the explain analyze output for the data built up so far. You would be able to keep hitting C-t and keep getting updates until the query completes or you decided to hit C-c. I'm not sure how easy this would be to implement but it sure would be nice from a user's point of view. Much nicer than having to specify some arbitrary limit before running the query. -- greg