Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id A357B9FBD4E for ; Wed, 1 Aug 2007 13:53:03 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 44617-04 for ; Wed, 1 Aug 2007 13:52:59 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 7E8479FBCFC for ; Wed, 1 Aug 2007 13:52:57 -0300 (ADT) Received: from perhan.alvh.no-ip.org ([190.95.0.211]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l71Gqpn7010407; Wed, 1 Aug 2007 09:52:51 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id E41AC47C4B; Wed, 1 Aug 2007 12:52:48 -0400 (CLT) Date: Wed, 1 Aug 2007 12:52:48 -0400 From: Alvaro Herrera To: "Carlos H. Reimer" Cc: Tom Lane , pgsql-performance@postgresql.org Subject: Re: RES: Improving select peformance Message-ID: <20070801165248.GF10324@alvh.no-ip.org> References: <15248.1184895068@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-11) X-Virus-Scanned: ClamAV 0.91.1/3846/Wed Aug 1 00:27:07 2007 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]); Wed, 01 Aug 2007 09:52:52 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/6 X-Sequence-Number: 26136 Carlos H. Reimer wrote: > Hi, > > I have changed the view to eliminate the bizarre concatenation conditions > but even so the response time did not change. Are you sure you did that? In the EXPLAIN it's still possible to see them, for example > -> Nested Loop (cost=1.34..3409.04 rows=1 width=159) > (actual time=0.237..32.520 rows=414 loops=1) > Join Filter: ((gra.codtam)::text = ((sub.codite)::text > || ''::text)) > -> Nested Loop (cost=1.34..3376.84 rows=28 width=136) > (actual time=0.226..20.978 rows=414 loops=1) > -> Hash Join (cost=1.34..3356.99 rows=28 > width=145) (actual time=0.215..15.225 rows=414 loops=1) > Hash Cond: ((gra.codcor)::text = > ((div.codite)::text || ''::text)) -- Alvaro Herrera http://www.amazon.com/gp/registry/CTMLCN8V17R4 "Uno combate cuando es necesario... ¡no cuando está de humor! El humor es para el ganado, o para hacer el amor, o para tocar el baliset. No para combatir." (Gurney Halleck)