I have the following database design in Teradata.
MAIN_TABLE - has two hard RIs to SUB_TABLE_1 and SUB_TABLE_2.
When I try to insert into the table (MAIN_TABLE) using 40 concurrent sessions using below insert startement, after 20 to 30 inserts getting 2631 error - Transaction Aborted due to deadlock.
INSERT INTO DEADLOCK_TEST.V_MAIN_TABLE (MAIN_TABLE_VALUE_1,SUB_TABLE_1,SUB_TABLE_2) VALUES ('main',1,1);
But when I try to insert with just one reference value into the same table using below statement, not getting deadlock.
INSERT INTO DEADLOCK_TEST.V_MAIN_TABLE (MAIN_TABLE_VALUE_1,SUB_TABLE_1) VALUES ('main',1);
We have a situation to support multiple hard RIs, but with the above behavior unable to proceed. Any help would be appreciated.