Hello when you use older pg than 8.3, please, use GROUP BY.
SELECT field FROM table GROUP BY field. Regards Pavel Stehule 2009/7/9 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. > > 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 > > -- > Sent via pgsql-general mailing list (pgsql-general@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-general > -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general