SELECT DISTINCT very slow - Mailing list pgsql-general

From Ben Harper
Subject SELECT DISTINCT very slow
Date
Msg-id 6def3e7b0907090809w3b498199mc98308b6984898c4@mail.gmail.com
Whole thread Raw
Responses Re: SELECT DISTINCT very slow
Re: SELECT DISTINCT very slow
Re: SELECT DISTINCT very slow
List pgsql-general
Hi,
Can anybody explain this:

Records: 600,000
Field Width: Approximately 20 UTF8 characters - type is VARCHAR(25)
Field is Indexed.

SELECT DISTINCT field FROM table;

Takes about 6 seconds. There are 111 distinct items.

On Sqlite, and another place where I have a B+Tree, this query is
faster than my eye can measure.

Is this a well known issue?

Thanks,
Ben

pgsql-general by date:

Previous
From: leif@crysberg.dk
Date:
Subject: Re: Bug in ecpg lib ?
Next
From: Chris Barnes
Date:
Subject: Asking for assistance in determining storage requirements