I have also another good example for a slow left join work. Can I do it better? explain analyze select * from a_doc D join A_SKLAD S ON(D.IDS=S.IDS_DOC) join A_MED M ON(S.IDS_MED=M.IDS) where d .date_op >= 9600 and d.date_op <= 9700;
-> Seq Scan on a_doc d (cost=0.00..13145.43 rows=11167 width=1344) (actual time=0.22..1316.10 rows=9432 loops=1)
I wouldn't expect too much from query, which starts joining over 10k rows and returns over 60000 rows. Do you really need such a big result?
Regards, Tomasz Myrta
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])