Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 9E569476454 for ; Fri, 20 Sep 2002 17:55:57 -0400 (EDT) Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 0F8114763DE for ; Fri, 20 Sep 2002 17:55:57 -0400 (EDT) Received: from [66.219.92.2] (HELO chocolate-mousse) by davinci.ethosmedia.com (CommuniGate Pro SMTP 3.5.9) with ESMTP id 1655518; Fri, 20 Sep 2002 14:54:25 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Aaron Held , Chris Ruprecht , pgsql-sql@postgresql.org Subject: Re: Performance w/ multiple WHERE clauses Date: Fri, 20 Sep 2002 14:55:30 -0700 X-Mailer: KMail [version 1.4] References: <5.1.1.6.2.20020918111926.00a82058@mail.nashlinux.com> <200209182039.59437.chrup@earthlink.net> <3D8B2C02.8020904@MetroNY.com> In-Reply-To: <3D8B2C02.8020904@MetroNY.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200209201455.30054.josh@agliodbs.com> X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/255 X-Sequence-Number: 9532 Aaron, > # SET enable_seqscan to FALSE ; > forced the use of an Index and sped things up greatly. >=20 > I am not sure why it made the switch. The load on the server seems to=20 > affect the performance, but I am seeing it more on the production server= =20 > with 100 million rows as opposed to the development server with only=20 > about 6 million. I need to buy more drives and develop on a larger data= =20 > set. What version are you using? I'd have 3 suggestions: 1) ANALYZE, ANALYZE, ANALYZE. Then check if the row estimates made by EXPL= AIN=20 seem accurate. 2) Modify your postgresql.conf file to raise the cost of seq_scans for pars= er=20 estimates. 3) Test this all again when 7.3 comes out, as parser estimate improves all = the=20 time. --=20 -Josh Berkus Aglio Database Solutions San Francisco