X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 31F659FB370 for ; Tue, 12 Sep 2006 16:21:26 -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 01832-03-5 for ; Tue, 12 Sep 2006 16:17:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from lists.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id EC5539FA4D7 for ; Tue, 12 Sep 2006 16:09:06 -0300 (ADT) Received: from alvh.no-ip.org (201-221-221-162.bk12-dsl.surnet.cl [201.221.221.162]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id k8CJ8SYI010843; Tue, 12 Sep 2006 12:08:30 -0700 Received: by alvh.no-ip.org (Postfix, from userid 1000) id C91F1C3716E; Tue, 12 Sep 2006 15:08:22 -0400 (CLT) Date: Tue, 12 Sep 2006 15:08:22 -0400 From: Alvaro Herrera To: =?iso-8859-1?Q?Pi=F1eiro?= Cc: Scott Marlowe , PSQL-Performance Subject: Re: [Fwd: Re: Performance problem with Sarge compared Message-ID: <20060912190822.GK19178@alvh.no-ip.org> Mail-Followup-To: =?iso-8859-1?Q?Pi=F1eiro?= , Scott Marlowe , PSQL-Performance References: <1158077206.4349.9.camel@codfix.local.igalia.com> <1158078004.1854.35.camel@state.g2switchworks.com> <1158085711.4349.24.camel@codfix.local.igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1158085711.4349.24.camel@codfix.local.igalia.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.3, clamav-milter version 0.88.3 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Tue, 12 Sep 2006 12:08:31 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.268 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/99 X-Sequence-Number: 20785 Piñeiro wrote: > El mar, 12-09-2006 a las 11:20 -0500, Scott Marlowe escribió: > > As Tom asked, post the explain analyze output for this query. I'm > > guessing there'll be a stage that is creating millions (possibly upon > > millions) of rows from a cross product. > > > Well, yes, it is a friend, but as the select at postgre Sarge version > never finished I can't use a explain analyze. I show you the explain, > with the hope that someone has any idea, but i think that this is almost > indecipherable (if you want the Woody ones i can post the explain > analyze). Thanks in advance. The only advice I can give you at this point is to provide both the EXPLAIN output and the query itself in formats more easily readable for those that could help you. This EXPLAIN you post below is totally whitespace-mangled, making it much harder to read than it should be; and the query you posted, AFAICS, is a continuous stream of lowercase letters. The EXPLAIN would be much better if you posted it as an attachment; and the query would be much better if you separated the logically distinct clauses in different lines, with clean indentation, using uppercase for the SQL keywords (SELECT, FROM, WHERE, etc). That way you're more likely to get useful responses. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support