Re: Query using SeqScan instead of IndexScan

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
Cc: chris smith <dmagick(at)gmail(dot)com>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Query using SeqScan instead of IndexScan
Date: 2006-04-02 04:46:09
Message-ID: 18072.1143953169@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Mark Kirkwood <markir(at)paradise(dot)net(dot)nz> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Ключников А.С. 2006-04-02 08:31:49 Trigger vs Rule
Previous Message Mark Kirkwood 2006-04-02 04:31:34 Re: Query using SeqScan instead of IndexScan