Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id C65039FB6A0 for ; Thu, 7 Jun 2007 19:21:24 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 93832-08 for ; Thu, 7 Jun 2007 19:21:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mis010-1.exch010.intermedia.net (mis010-1.exch010.intermedia.net [64.78.61.91]) by postgresql.org (Postfix) with ESMTP id 240F99FB661 for ; Thu, 7 Jun 2007 19:21:19 -0300 (ADT) Received: from ehost010-33.exch010.intermedia.net ([64.78.20.173]) by mis010-1.exch010.intermedia.net with Microsoft SMTPSVC(6.0.3790.1830); Thu, 7 Jun 2007 15:21:17 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: Re: index vs. seq scan choice? Date: Thu, 7 Jun 2007 15:21:14 -0700 Message-ID: <8C5B026B51B6854CBE88121DBF097A86DEA6C5@ehost010-33.exch010.intermedia.net> In-Reply-To: <4668804F.6090201@commandprompt.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [GENERAL] index vs. seq scan choice? Thread-Index: AcepTs+SlHbhjrVJSe2iNu1p57l1zwAAeMBg References: <8C5B026B51B6854CBE88121DBF097A86C3A30D@ehost010-33.exch010.intermedia.net> <27828.1180055291@sss.pgh.pa.us> <8C5B026B51B6854CBE88121DBF097A86DEA6B4@ehost010-33.exch010.intermedia.net> <4668804F.6090201@commandprompt.com> From: "George Pavlov" To: "Joshua D. Drake" Cc: "Tom Lane" , X-OriginalArrivalTime: 07 Jun 2007 22:21:17.0687 (UTC) FILETIME=[2AFB4070:01C7A952] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200706/545 X-Sequence-Number: 115368 > From: Joshua D. Drake [mailto:jd@commandprompt.com] >=20 > In those rare cases wouldn't it make more sense to just set=20 > enable_seqscan to off; run query; set enable_seqscan to on; 1. these cases are not that rare (to me); 2. setting enable_seqscan (in JDBC, say) from the application makes the whole thing quite a mess (need to do a batch of statements: each query wrapped in its enable/disable seq scan?) -- ideally, one would like to issue mostly SQL statements, not config parameters from the application; 3. if this is the recommended suggestion on how to run queries then why don't we just add HINTS to the system and be done with it...