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 152CF11F6089 for ; Tue, 25 Apr 2006 12:54:18 -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 40553-04 for ; Tue, 25 Apr 2006 12:54:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id A9E7711F6237 for ; Tue, 25 Apr 2006 12:54:07 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 5544D314AA; Tue, 25 Apr 2006 17:54:06 +0200 (MET DST) From: "codeWarrior" X-Newsgroups: pgsql.performance Subject: Re: Easy question Date: Tue, 25 Apr 2006 08:55:29 -0700 Organization: iDynaTECH, Inc. Lines: 25 Message-ID: References: <1145741653.759727.38970@e56g2000cwe.googlegroups.com> Reply-To: "codeWarrior" X-Complaints-To: usenet@news.hub.org X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Original To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/689 X-Sequence-Number: 18773 SELECT geom, group, production_facs FROM south_america WHERE UPPER(municipio) IN ('ACRE', 'ADJUNTAS', 'AGUADA'); wrote in message news:1145741653.759727.38970@e56g2000cwe.googlegroups.com... > 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 >