Re: select distinct too slow - Mailing list pgsql-sql

From Hans-Jürgen Schönig
Subject Re: select distinct too slow
Date
Msg-id 3B1C0166.FC3E4CF5@cybertec.at
Whole thread Raw
In response to select distinct too slow  (george young <gry@ll.mit.edu>)
List pgsql-sql
Did you vacuum analyse your table after creating the index?
A solution for your problem would be to turn sequential scans ofd before querying the table.
This should work somehow like that:

myjava=# SET enable_seqscan TO 'off';
SET VARIABLE
myjava=# show enable_seqscan;
NOTICE:  enable_seqscan is off
SHOW VARIABLE

check out the docs for further information.
   Hans





pgsql-sql by date:

Previous
From: David Richter
Date:
Subject: Memory exhausted
Next
From: Hans-Jürgen Schönig
Date:
Subject: Re: seleting all dates between two dates