Re: Query using SeqScan instead of IndexScan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query using SeqScan instead of IndexScan
Дата
Msg-id 18072.1143953169@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Query using SeqScan instead of IndexScan  (Mark Kirkwood <markir@paradise.net.nz>)
Список pgsql-performance
Mark Kirkwood <markir@paradise.net.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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Mark Kirkwood
Дата:
Сообщение: Re: Query using SeqScan instead of IndexScan
Следующее
От: Ключников А.С.
Дата:
Сообщение: Trigger vs Rule