Search Postgresql Archives

Re: DISTINCT is not quite distinct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Tom Lane:

>> According to EXPLAIN, an index scan on the bar column is used (using
>> the underlying B-tree index).
>
> Do you mean an indexscan followed immediately by a Unique node?  If
> so, yeah, that would depend entirely on correct ordering of the
> indexscan output to produce distinct results.

Yes.

>> If I drop the DISTINCT, the output is not correctly ordered, either.
>> Perhaps this is an index corruption issue?  The hardware itself seems
>> fine.
>
> Perhaps.  Do you want to save off a physical copy of the index and then
> try REINDEXing?

The duplicate row is gone.

> If that fixes it, I'd be interested to compare the two versions of
> the index.

The index files are about 155 MB and 98 MB, compressed.  How shall we
transfer them?  (Their contents is not super-secret, but I don't want
to distribute them widely, either.)

-- 
Florian Weimer                <fweimer@xxxxxx>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux