Re: [HACKERS] poor performance of subquery in psql

2003-01-29 Thread Tom Lane
"John Liu" <[EMAIL PROTECTED]> writes: > why psql subquery is not smarter enough to use > indexes if obviously? IN is smarter as of CVS tip. regards, tom lane ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

[HACKERS] poor performance of subquery in psql

2003-01-28 Thread John Liu
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 = 4 doc records = 500 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