Hi,
I have a table with 1.1 million records
The following queries:
Update table set somecolumnname=value where someothercolumn=(subquery that returns a
value) -(1)
Update table set somecolumnname=value where someothercolumn=null -(2)
both execute quickly(a few millisecs)
note that (1) runs quickly and will update rows
(2) will update no rows
Note that all columns in the table are NOT NULL which is why (2) will always update no
rows
However
Update table set somecolumnname=value where someothercolumn=(a subquery that returns
no rows) -(3)
Takes over 1 MINUTE to update NO ROWS
Note:The subquery is not correlated with the first query and on its own executes in 1
millisec.
(3) will always update no rows for because someothercolumn was created with NOT NULL.
Note that (3) is a special case of (1) in my code.
Unfortunately I could not get sqlstudio to 'explain' an update query
Any suggestions to improve performance?
Also is it possible to explain an UPDATE statement?
Regards,
Ajit
P.S : I am running in SQLMode Oracle.
SAPDB ver: 7.3.0.25
The Subquery was originally a function before I ported from oracle to SAPDB and
everything is fine when I run under oracle.
All needed indices are created too.
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general