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 D49C29FB1F0 for ; Tue, 2 May 2006 14:15:31 -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 50634-07 for ; Tue, 2 May 2006 14:15:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 668729FA1B0 for ; Tue, 2 May 2006 14:15:00 -0300 (ADT) Received: by noel.decibel.org (Postfix, from userid 1001) id 8026756437; Tue, 2 May 2006 12:14:59 -0500 (CDT) Received: (hashcash-sendmail, from uid 1001); Tue, 2 May 2006 12:14:58 -0500 Date: Tue, 2 May 2006 12:14:58 -0500 From: "Jim C. Nasby" To: clemens.bertschler@gmail.com Cc: pgsql-performance@postgresql.org Subject: Re: Easy question Message-ID: <20060502171458.GY97354@pervasive.com> References: <1145741653.759727.38970@e56g2000cwe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1145741653.759727.38970@e56g2000cwe.googlegroups.com> X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060502:clemens.bertschler@gmail.com::CD08nMcBo8wqM/oH:000000000 000000000000000000000000BRcp X-Hashcash: 1:20:060502:pgsql-performance@postgresql.org::jUmXTnDCthiSB35H:00000 0000000000000000000000001aDo X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/28 X-Sequence-Number: 18815 You didn't mention version, but 8.1.x has bitmap index scans that might greatly speed this up... On Sat, Apr 22, 2006 at 02:34:13PM -0700, clemens.bertschler@gmail.com wrote: > Hi List > I have maybe an easy question but i do not find an answer, i have this > SQL query: > > SELECT geom,group,production_facs FROM south_america > WHERE municipio = '' > OR municipio = 'ACRE' > OR municipio = 'ADJUNTAS' > OR municipio = 'AGUADA' > > The performance of this query is quite worse as longer it gets, its > possible that this query gets over 20 to 30 OR comparisons, but then > the performance is really worse, is it possible to speed it up? > Thanks > Clemens > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings > -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461