[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1058
  • Last Modified:

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,
0
byteboy11
Asked:
byteboy11
  • 2
  • 2
1 Solution
 
sandeep_patelCommented:
Is there something you call the procedure in a loop from powerbuilder?
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
0
 
byteboy11Author Commented:
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_desc,:li_override
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
0
 
sandeep_patelCommented:
Instead of ODBC, try to use SQL Server Native Drivers. Also in ODBC profile confirm 'Trace ODBC API Calls' is not checked on 'Options' tab or not mentioned in your SQLCA connection profile.

Is this the only procedure takes long time or the same behaviour with any procedure call?

Regards,
Sandeep
0
 
byteboy11Author Commented:
good answer
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now