Hot answers tagged jdbc
2
Consider a parent/child table such as client/order.
You can't delete a client that has an order. Say client 123 has an order A123. Fred does a delete for that order but does not commit. Then "Jane" tries to delete client 123.
Since Fred's statement can potentially rollback, the client can't be deleted because it isn't allowed to the leave the order ...
2
Delete is a DML command and stores the data in redo log till the delete operation is committed.
This means that if data to be removed by delete is slightly large[even though search time is less] it will take longer time as it will move data to redo log.
So may be the instance when your operation took longer large no. of rows were being deleted to many ...
1
This could happen if:
- Your table MYTABLE has a unique column UNIQCOL
- This MYTABLE.UNIQCOL is referenced by some column in another table, say MYTABLE2.UNIQCOL_REF
- This MYTABLE2.UNIQCOL_REF is not indexed.
Adding a (non-unique) index to MYTABLE2.UNIQCOL_REF could then solve the problem.
(You said all FKs in MYTABLE are indexed, but you didn't say ...
Only top voted, non community-wiki answers of a minimum length are eligible