poor performance of subquery in psql - Mailing list pgsql-hackers

From John Liu
Subject poor performance of subquery in psql
Date
Msg-id NDBBKKKHILOHGHNKGOCEOECHELAA.johnl@emrx.com
Whole thread Raw
In response to Re: [PATCH] psql visibility clarification patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: poor performance of subquery in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: Fix for log_min_error_messages
Next
From: Marek Mosiewicz
Date:
Subject: OLE DB PostgreSQL provider