1. the following query is so slow, after 12 hours, I kill it - delete from doc where cdi in (select cdi from doc_b1); doc_b1 records = 40000 doc records = 5000000 cdi are indexed in both table.
2. I rewrite the above task in plpgsql, it takes 10 secs to finish. why psql subquery is not smarter enough to use indexes if obviously? johnl ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly