Subject | Speedup delete-statement |
---|---|
Author | swestner |
Post date | 2008-08-10T20:09:49Z |
Hello,
does anybody know if there is an alternative to the following select:
delete from businessclassesroot where bold_id in
(select bold_id from iwadisobject_lrutimeslot where objects not in
(select bold_id from iwadisobject))
It runs about an hour on a DB which have 30.000.000 entries in
businessclassesroot and iwadisobject.
The actual plan is:
PLAN (IWADISOBJECT NATURAL)
PLAN (IWADISOBJECT_LRUTIMESLOT INDEX (IX_IWADISOBJECT_LRUTIMESL09I))
PLAN (BUSINESSCLASSESROOT NATURAL)
There are indexes on ale columns which are used in the SQL.
Thanks
Stefan
does anybody know if there is an alternative to the following select:
delete from businessclassesroot where bold_id in
(select bold_id from iwadisobject_lrutimeslot where objects not in
(select bold_id from iwadisobject))
It runs about an hour on a DB which have 30.000.000 entries in
businessclassesroot and iwadisobject.
The actual plan is:
PLAN (IWADISOBJECT NATURAL)
PLAN (IWADISOBJECT_LRUTIMESLOT INDEX (IX_IWADISOBJECT_LRUTIMESL09I))
PLAN (BUSINESSCLASSESROOT NATURAL)
There are indexes on ale columns which are used in the SQL.
Thanks
Stefan