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 E8E233A3BE8 for ; Fri, 29 Oct 2004 00:49:40 +0100 (BST) 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 89496-08 for ; Thu, 28 Oct 2004 23:49:31 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4C61F3A2B41 for ; Fri, 29 Oct 2004 00:49:31 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i9SNnTOk009173; Thu, 28 Oct 2004 19:49:29 -0400 (EDT) To: "Jim C. Nasby" Cc: John Meinel , pgsql-performance@postgresql.org Subject: Re: Sequential Scan with LIMIT In-reply-to: <20041028234658.GI55164@decibel.org> References: <417C023F.1080502@johnmeinel.com> <17689.1098648713@sss.pgh.pa.us> <20041028234658.GI55164@decibel.org> Comments: In-reply-to "Jim C. Nasby" message dated "Thu, 28 Oct 2004 18:46:58 -0500" Date: Thu, 28 Oct 2004 19:49:28 -0400 Message-ID: <9172.1099007368@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/466 X-Sequence-Number: 8942 "Jim C. Nasby" writes: > On Sun, Oct 24, 2004 at 04:11:53PM -0400, Tom Lane wrote: >> The test case you are showing is probably suffering from nonrandom >> placement of this particular data value; which is something that the >> statistics we keep are too crude to detect. > Isn't that exactly what pg_stats.correlation is? No. A far-from-zero correlation gives you a clue that on average, *all* the data values are placed nonrandomly ... but it doesn't really tell you much one way or the other about a single data value. regards, tom lane