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 C3CFE9FB1B9 for ; Tue, 6 Jun 2006 14:46:04 -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 35018-06 for ; Tue, 6 Jun 2006 14:45:57 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from moonunit2.moonview.localnet (wsip-70-167-125-69.sd.sd.cox.net [70.167.125.69]) by postgresql.org (Postfix) with ESMTP id 189089FA13E for ; Tue, 6 Jun 2006 14:45:57 -0300 (ADT) Received: from [192.168.0.3] (moonunit3.moonview.localnet [192.168.0.3]) by moonunit2.moonview.localnet (8.13.1/8.13.1) with ESMTP id k56Hv0PA031298 for ; Tue, 6 Jun 2006 10:57:01 -0700 Message-ID: <4485BF25.4080701@modgraph-usa.com> Date: Tue, 06 Jun 2006 10:45:09 -0700 From: "Craig A. James" User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: 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> In-Reply-To: <1149604741.2621.487.camel@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/64 X-Sequence-Number: 19421 Simon Riggs wrote: >>Well, it's a big query. If it ought to take a second or two, and >>instead is taking an hour or two (1800 times the expected runtime), that >>might be close enough to "never" to exhaust Chris' patience. Besides, >>we don't know whether the 1800 might itself be an underestimate (too bad >>Chris didn't provide EXPLAIN ANALYZE results). > > This is a good example of a case where the inefficiency of EXPLAIN > ANALYZE would be a contributory factor to it not actually being > available for diagnosing a problem. This is a frustration I have, but Simon expressed it much more concisely. The first question one gets in this forum is, "did you run EXPLAIN ANALYZE?" But if EXPLAIN ANALYZE never finishes, you can't get the information you need to diagnose the problem. Simon's proposal, > e.g. EXPLAIN ANALYZE ERRLIMIT 10 SELECT ... or something similar, would be a big help. I.e. "If you can't finish in a reasonable time, at least tell me as much as you can." Craig