X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 86E0CD8B2D for ; Sat, 3 Sep 2005 18:02:30 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99919-07 for ; Sat, 3 Sep 2005 21:02:27 +0000 (GMT) Received: from web35508.mail.mud.yahoo.com (web35508.mail.mud.yahoo.com [66.163.179.132]) by svr1.postgresql.org (Postfix) with SMTP id 48177D8B22 for ; Sat, 3 Sep 2005 18:02:25 -0300 (ADT) Received: (qmail 75396 invoked by uid 60001); 3 Sep 2005 21:02:27 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.br; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=RHKvjUQeNSMjDAfse3Nuz3Mertsz2XRutzsKdbwLGVVYvfYGnGaYVEXa3psZgWm/dUPh27nazfMQKf3mdLqldEZ2UnYZWX1VgiMs6lPrXAwvUnZl1vYtnm/0y1ySsEEPLWabiGtC5sml3sVqO9lTwf52vshpvA78qgCOAcP6GD4= ; Message-ID: <20050903210227.75394.qmail@web35508.mail.mud.yahoo.com> Received: from [201.34.168.229] by web35508.mail.mud.yahoo.com via HTTP; Sat, 03 Sep 2005 21:02:27 GMT Date: Sat, 3 Sep 2005 21:02:27 +0000 (GMT) From: Carlos Benkendorf Subject: Improving performance of a query To: pgsql-performance@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-381588866-1125781347=:75377" Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.702 required=5 tests=[AWL=-0.177, DNS_FROM_RFC_ABUSE=0.374, HTML_20_30=0.504, HTML_MESSAGE=0.001] X-Spam-Level: X-Archive-Number: 200509/65 X-Sequence-Number: 14373 --0-381588866-1125781347=:75377 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, Is there a way to improve the performance of the following query? SELECT * FROM SSIRRA where (YEAR = 2004 and CUSTOMER = 0000000004 and CODE = 00 and PART >= 00) or (YEAR = 2004 and CUSTOMER = 0000000004 and CODE > 00) or (YEAR = 2004 and CUSTOMER > 0000000004) or (YEAR > 2004) Thanks in advance! Benkendorf __________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ --0-381588866-1125781347=:75377 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 8bit
Hi,
 
Is there a way to improve the performance of the following query?
 
SELECT * FROM SSIRRA where
(YEAR = 2004 and CUSTOMER = 0000000004 and CODE = 00 and PART >= 00) or
(YEAR = 2004 and CUSTOMER = 0000000004 and CODE > 00) or
(YEAR = 2004 and CUSTOMER > 0000000004) or
(YEAR > 2004)
 
Thanks in advance!
 
Benkendorf

__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/ --0-381588866-1125781347=:75377--