There is an application Application1 which is issuing insert statement that we are using in Prod
INSERT INTO Table1
(SELECT FROM Table2
WHERE conditions are true)
There is another application Apllication2 which is doing a select query on Table2
SELECT FROM Table2
WHERE conditions are true
with ur
Now whenever the insert query is running, the second query is running very slow, sometimes getting read timed out.
I tried to find if the Table2 was getting locked due to being part of the insert statement, but I couldn't find any concrete evidence.
I did find something for MySQL How to improve INSERT INTO ... SELECT locking behavior
but nothing for DB2.
Can somebody please help me understand the cause of slowness ?