| From: | <sar(at)northelectriccompany(dot)com> |
|---|---|
| To: | <pgsql-general(at)postgresql(dot)org> |
| Subject: | delete with index scan |
| Date: | 2004-11-30 09:55:58 |
| Message-ID: | 200411300955.iAU9twV8015258@mail2.atl.registeredsite.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I have a table t1 with a primary key column pkey, and a table t2, with a primary key column pkey. Is there a way to make the following delete use the indexes?
delete from t1 where pkey in (select pkey from t2);
NOTICE: QUERY PLAN:
Seq Scan on t1 (cost=0.00..6616238.99 rows=660239 width=6)
SubPlan
-> Seq Scan on t2 (cost=0.00..20.00 rows=1000 width=8)
EXPLAIN
thanks,
Sally
------------------------------------------
Sally Ruggero
Software Development
North Electric Company, Inc.
6131 Falls of Neuse Road, Suite 205
Raleigh, NC 27609
Office: (919) 341-6009
Fax: (919) 341-6010
Email: sally(dot)ruggero(at)northelectriccompany(dot)com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | deepthi | 2004-11-30 10:29:15 | Maximum limit on int in plpgsql |
| Previous Message | Tino Wildenhain | 2004-11-30 09:42:44 | Re: change natural column order |