Mario Splivalo <[EMAIL PROTECTED]> writes:
> I have a quite large query that takes over a minute to run on my laptop.

The EXPLAIN output you provided doesn't seem to agree with the stated
query.  Where'd the "service_id = 1102" condition come from?

In general, I'd suggest playing around with the join order.  Existing
releases of PG tend to throw up their hands when faced with a mixture of
outer joins and regular joins, and just join the tables in the order
listed.  8.2 will be smarter about this, but for now you have to do it
by hand ...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to