Hi folks, <p>I think there is still a problem , <p>email_bank contains ~ 1 million records and t_a contains 58
records<br />both are indexed on email_id ( integer colmn.) i want to remove these 58 records <br />from email_bank
whereemail_id in t_a & email_bank match. <p>but the below is still slow ! <br /><font size="-1"></font> <font
size="-1"></font><p><fontsize="-1">explain delete from email_bank where exists (select email_id from t_a where
email_bank.email_id=t_a.email_id);</font><br /><font size="-1">NOTICE: QUERY PLAN:</font><font
size="-1"></font><p><fontsize="-1">Seq Scan on email_bank (cost=0.00..1760313.80 rows=1009397 width=6)</font><br
/><fontsize="-1"> SubPlan</font><br /><font size="-1"> -> Seq Scan on t_a (cost=0.00..1.73 rows=1
width=4)</font><fontsize="-1"></font><p><font size="-1">EXPLAIN</font><font size="-1"></font><p>PS: <br />I ran VACUUM
ANALYZEon email_bank and t_a and both are indexed on email_id before <br />the explain . <br /> <p>regds <br
/>mallah.<br /><font size="-1"></font> <tt></tt><p>Rajesh Kumar Mallah wrote: <blockquote type="CITE">Hi folks, <p>We
requireto do below or similar quite often <p>DELETE from t_a where email in (select email from t_b); <p>everyone knows
"IN"is pain fully slow currently in pgsql <br />is the any fster alternative to above query <p>regds <br />Mallah.
<p>---------------------------(endof broadcast)--------------------------- <br />TIP 1: subscribe and unsubscribe
commandsgo to majordomo@postgresql.org</blockquote>