Re: Distinct oddity

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Distinct oddity
Дата
Msg-id 13494.1241812363@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Distinct oddity  (Maximilian Tyrtania <maximilian.tyrtania@onlinehome.de>)
Ответы Re: Distinct oddity
Список pgsql-sql
Maximilian Tyrtania <maximilian.tyrtania@onlinehome.de> writes:
> am 07.05.2009 20:54 Uhr schrieb Scott Marlowe unter scott.marlowe@gmail.com:
>> Yeah, that does seem odd.  Could it be something like nulls in your
>> data set?  just guessing really.  If you could make a small test case
>> that shows it happening and allows others to reproduce it you're
>> likely to get more bites.

> It doesn't seem to be related to null values (which wouldn't explain it
> anyway) nor to this particular field...

Can you reproduce it in other contexts than specifically count(distinct)?
In particular I'd try
select count(*) from  (select distinct f.bezeichnung from firmen f) ss;
select count(*) from  (select distinct f.bezeichnung||'e' from firmen f) ss;

If those give the same numbers as you're showing here, then the
next step would be to dump out the actual results of the SELECT DISTINCT
queries and compare them --- looking at the actual data values should
give some insight as to what's happening.

BTW, what is the datatype of f.bezeichnung, and what locale are you
running in?
        regards, tom lane


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

Предыдущее
От: Peter Koczan
Дата:
Сообщение: Re: ascii-betical sort order?
Следующее
От: Emi Lu
Дата:
Сообщение: view vs. tables used to define that view