Subject | Stored procedure never completes |
---|---|
Author | esbreidenbach |
Post date | 2013-08-10T15:34:42Z |
I am building a data conversion program (in Delphi XE) to convert an old paradox desktop application to a firebird desktop application. During the data conversion, I am de-activating indices, triggers, and removing constraints while the data is being inserted into the firebird tables.
After the inserts are complete, I re-activate the indices, triggers and constraints.
Now, with the database structure back in place, I run a few stored procedures to replicate what would have been handled by some of the triggers which were de-activated. The main procedure updates a summary table based on some complex queries.
This all works fine when I run the procedure manually using flame-robin (for testing). But when I run the procedure as part of the data conversion program in (Delphi XE), the stored procedure hangs. Then I stop the program , immediately run the same procedure from flame-robin, and it successfully executes in 2 minutes.
It appears to succeed in the data conversion program if I limit the number of records being converted to a subset (15000) of the total records (350,000) in the database . But if I run the program on the entire database, it the procedure hangs.
I have tried disconnecting and re-connecting to the database prior to running the procedure, but still no luck.
Any thoughts?
After the inserts are complete, I re-activate the indices, triggers and constraints.
Now, with the database structure back in place, I run a few stored procedures to replicate what would have been handled by some of the triggers which were de-activated. The main procedure updates a summary table based on some complex queries.
This all works fine when I run the procedure manually using flame-robin (for testing). But when I run the procedure as part of the data conversion program in (Delphi XE), the stored procedure hangs. Then I stop the program , immediately run the same procedure from flame-robin, and it successfully executes in 2 minutes.
It appears to succeed in the data conversion program if I limit the number of records being converted to a subset (15000) of the total records (350,000) in the database . But if I run the program on the entire database, it the procedure hangs.
I have tried disconnecting and re-connecting to the database prior to running the procedure, but still no luck.
Any thoughts?