I have a table T1
with a virtual column V1 which is generated automatically based on some condition and also a foreign key is created with Column C1
of table T2
.
Now when table T1
is locked and I try to delete record from table T2
then it is not working and the sessions waits for lock acquire for limitless time EVEN THOUGH NO REFERENCE DATA AVAILABLE IN T1.
ALTER TABLE T1 ADD (V1 INVISIBLE generated always as (decode (C11, 20,C12))
virtual constraint vfk REFERENCES T2 (C1))
Even I tried by making the FK as ON DELETE CASCADE
, and not luck.
Please help.
It only helps if I remove the FK completely but we need them to validate the data in case any match found.