I have an INSERT statement which is pretty complex, BUT it inserts data in 10 minutes on average consistentlly. When I put the INSERT into a PROCEDURE 'wrapper' so I can call it, it never finishes. The EXPLAIN PLAN is good and most steps are in the seconds. What am I doing wrong?
REPLACE PROCEDURE database1.PROC_INSERT_MONEY ()
/* Insert Data Using existing MONEY INSERT CODE */
/* 1 of 1 */
INSERT INTO database1.MONEY_TABLE
The same insert performs in ten minutes, but procedure version doesn't finish.
My initial thought:
If ANSI mode, can it be because of no commit?
Can it be that you are running at the same time when you run the insert independently ?