> Hi,>> I am trying to tune a query that is taking too much time on a large> dataset (postgres 8.3).>
Hi, run ANALYZE on the tables used in the query - the stats are very off,so the db chooses a really bad execution plan.
Tomas