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 D30403A546B for ; Wed, 1 Dec 2004 05:06:50 +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 69786-10 for ; Wed, 1 Dec 2004 05:06:32 +0000 (GMT) Received: from davinci.ethosmedia.com (server226.ethosmedia.com [209.128.84.226]) by svr1.postgresql.org (Postfix) with ESMTP id 7D5013A5451 for ; Wed, 1 Dec 2004 05:06:31 +0000 (GMT) Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 6728689; Tue, 30 Nov 2004 21:08:02 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: pgsql-performance@postgresql.org Subject: Re: Using "LIMIT" is much faster even though, searching Date: Tue, 30 Nov 2004 21:03:51 -0800 User-Agent: KMail/1.6.2 Cc: "Hyun-Sung, Jang" , Tom Lane References: <41AD4433.1030909@siche.net> <1390.1101875171@sss.pgh.pa.us> <41AD4AD0.908@siche.net> In-Reply-To: <41AD4AD0.908@siche.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200411302103.51643.josh@agliodbs.com> 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/11 X-Sequence-Number: 9386 Hyun-Sang, > before test, I already executed VACUUM FULL. > this result show up after vacuum full. Really? Your results really look like a bloated table. Can you run VACUUM FULL ANALYZE VERBOSE on the table and post the output? > When I using index scan, the result was almost same, that means, there > was no time difference, so i'll not mention about index scan. Can we see an index scan plan anyway? EXPLAIN ANALYZE? Oh, and if this is a zip codes table, why are you using a sequence as the primary key instead of just using the zip code? -- Josh Berkus Aglio Database Solutions San Francisco