X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 95E3311F6B1D for ; Sun, 2 Apr 2006 00:46:17 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 96291-05 for ; Sun, 2 Apr 2006 00:46:15 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 7022411F6AFA for ; Sun, 2 Apr 2006 00:46:15 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k324k9LW018073; Sat, 1 Apr 2006 23:46:09 -0500 (EST) To: Mark Kirkwood cc: chris smith , "Jim C. Nasby" , PostgreSQL Performance Subject: Re: Query using SeqScan instead of IndexScan In-reply-to: <442F53A6.9090707@paradise.net.nz> References: <2F1712F1-E5E2-455E-A291-06F300A66549@clickspace.com> <20060331155911.GP49405@pervasive.com> <3c1395330603311723i368092f2jf0c2291ab033ae2a@mail.gmail.com> <20060401153247.GI49405@pervasive.com> <3c1395330604011650r61c793a7td3e8be58ab023c7b@mail.gmail.com> <3c1395330604011732n4cd523c3gf7c1e4c346630aad@mail.gmail.com> <442F53A6.9090707@paradise.net.nz> Comments: In-reply-to Mark Kirkwood message dated "Sun, 02 Apr 2006 16:31:34 +1200" Date: Sat, 01 Apr 2006 23:46:09 -0500 Message-ID: <18072.1143953169@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.114 required=5 tests=[AWL=0.114] X-Spam-Score: 0.114 X-Spam-Level: X-Archive-Number: 200604/9 X-Sequence-Number: 18093 Mark Kirkwood writes: > It is a bit confusing - '(distinct) cardinality' might be a better > heading for their 'cardinality' column! The usual mathematical meaning of "cardinality" is "the number of members in a set". That isn't real helpful for the point at hand, because the mathematical definition of a set disallows duplicate members, so if you're dealing with non-unique values you could argue it either way about whether to count duplicates or not. However, I read in the SQL99 spec (3.1 Definitions) d) cardinality (of a value of a collection type): The number of elements in that value. Those elements need not necessarily have distinct values. so ... as all too often ... the mysql boys have not got a clue about standards compliance. They are using this term in the opposite way from how the SQL committee uses it. regards, tom lane