X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id F06E83B5784 for ; Fri, 24 Dec 2004 02:06:09 +0000 (GMT) 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 46785-09 for ; Fri, 24 Dec 2004 02:05:52 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id D56E93B5793 for ; Fri, 24 Dec 2004 02:05:54 +0000 (GMT) Received: (qmail 23109 invoked from network); 24 Dec 2004 03:05:56 +0100 Received: from unknown (HELO musicbox) (boutiquenumerique-lists@192.168.0.2) by boutiquenumerique.com with SMTP; 24 Dec 2004 03:05:56 +0100 Date: Fri, 24 Dec 2004 03:05:59 +0100 To: pgsql-performance@postgresql.org Subject: Re: Using LIMIT changes index used by planner References: <41BD3317.9090507@dmv.com> <1102931789.11712.9.camel@lamb.mcmillan.net.nz> <41BE1270.7060908@dmv.com> <28820.1102977787@sss.pgh.pa.us> From: =?iso-8859-15?Q?Pierre-Fr=E9d=E9ric_Caillaud?= Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <28820.1102977787@sss.pgh.pa.us> User-Agent: Opera M2/7.54 (Linux, build 751) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200412/286 X-Sequence-Number: 9661 On Mon, 13 Dec 2004 17:43:07 -0500, Tom Lane wrote: > Sven Willenberger writes: >> explain analyze select storelocation,order_number from custacct where >> referrer = 1365 and orderdate between '2004-12-07' and '2004-12-07 >> 12:00:00' order by custacctid limit 10; why not create an index on referrer, orderdate ?