![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I have a query that is either long running or stuck. It appears to be stuck, but I can't determine why. [snip] |
|
delete from table1 where col1 not in (select col1 from table2); |
|
SE Join .... |
#4
| |||
| |||
|
|
Do you know how to use ipm? |
|
I've also attached a program which may help you. It's a UNIX shell scriptthat uses the imadb ... obviously you need both of those things to executeit. This part of mail contained an attachment with prohibited file name: * MIME type: application/octet-stream * File name: blocking_locks.sh * File size: 9.93 kB The attachment was removed by Kerio Connect 7.1.4 patch 1 at secure1.fndtn.com. |
#5
| |||
| |||
|
|
col1 is nullable, isn't it? Yes |
|
*If you can redefine that column as NOT NULL, the SE-join will go away. * This is part of a data clean-up exercise :-( col1 is a combination |
|
Alternatively, try rewriting the delete as: delete from table1 t1 * * where not exists (select * from table2 t2 where t1.col1 = t2.col2) which I believe will also avoid the SE-join. *(Assuming you aren't relying on the screwy NULL semantics of the NOT IN version!) |
#6
| |||
| |||
|
|
On May 11, 2011, at 2:59 PM, droesler wrote: I have a query that is either long running or stuck. *It appears to be stuck, but I can't determine why. delete from table1 * *where col1 not in (select col1 from table2); *Alternatively, try rewriting the delete as: delete from table1 t1 * * where not exists (select * from table2 t2 where t1.col1 = t2.col2) which I believe will also avoid the SE-join. *(Assuming you aren't relying on the screwy NULL semantics of the NOT IN version!) |
#7
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |