In response to Ben Harper <rogo...@gmail.com>:
> 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.

What's the output of EXPLAIN ANALYZE SELECT DISTINCT field FROM table;?

Does a VACUUM ANALYZE of the table help?  Is the query significantly
faster the second time you run it?

> Is this a well known issue?

Not that I'm aware of.

-- 
Bill Moran
http://www.potentialtech.com
http://people.collaborativefusion.com/~wmoran/

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to