space for optimalization: DISTINCT without index - Mailing list pgsql-hackers

From Pavel Stehule
Subject space for optimalization: DISTINCT without index
Date
Msg-id BAY20-F59CECE51E0306DA4DE864F9460@phx.gbl
Whole thread Raw
Responses Re: space for optimalization: DISTINCT without index
List pgsql-hackers
Hello

I did some test and I can see so DISTINCT works well on indexed columns, but 
is slow on derived tables without indexes. If I use without distinct group 
by I get much better times.

SELECT DISTINCT a, b FROM tab
SELECT a,b FROM tab GROUP BY a, b.

Can You Explain it.

Thank You
Pavel Stehule

_________________________________________________________________
Citite se osamele? Poznejte nekoho vyjmecneho diky Match.com. 
http://www.msn.cz/



pgsql-hackers by date:

Previous
From: Volkan YAZICI
Date:
Subject: number of loaded/unloaded COPY rows
Next
From: Jan Wieck
Date:
Subject: Re: Foreign key trigger timing bug?