byteboy11
asked on
Stored Procedure Slow through Powerbuilder
I have a stored procedure that executes within 3 minutes from the SQL Server 2005 console but when I call the same procedure from within my Powerbuilder App it takes 40 minutes.
Are there any things to look for as to why there would be such a huge difference in run times?
Thanks,
Are there any things to look for as to why there would be such a huge difference in run times?
Thanks,
ASKER
There is no looping in the PB side code.
Not calling from a datawindow just calling directly
Using ODBC drivers
This is the PB Code(1 hour to run):
DECLARE sp_import_my_data PROCEDURE FOR
sp_import_my_data :ai_do_insert,:il_emp_id,: is_data_de sc,:li_ove rride
USING SQLCA ;
EXECUTE sp_import_my_data ;
This is how I'm running it from the sql 2005 query analyizer window(3min to run):
exec sp_import_my_data 1,'1','test import1',0
Not calling from a datawindow just calling directly
Using ODBC drivers
This is the PB Code(1 hour to run):
DECLARE sp_import_my_data PROCEDURE FOR
sp_import_my_data :ai_do_insert,:il_emp_id,:
USING SQLCA ;
EXECUTE sp_import_my_data ;
This is how I'm running it from the sql 2005 query analyizer window(3min to run):
exec sp_import_my_data 1,'1','test import1',0
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
good answer
Are you calling procedure from datawindow?
What drivers you are using for database connection?
It would be better if you paste the code here about how you call it from both sql console and powerbuilder for comparison...
Regards,
Sandeep