Some doubts using StoredProcedure?

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
matuk
Posts: 4
Joined: Tue 16 Nov 2004 10:30
Contact:

Some doubts using StoredProcedure?

Post by matuk » Thu 18 Nov 2004 16:09

Hi All.

In the application I'm developing, 99 % of our queries are inside StoredProcedures. The problem started when I began to watch the time when I open about 15 procedures at once, in a part of my application, the first time I open the procedures it takes about 1,8 seconds to execute all of them, and after the first time it takes about 0,8 seconds to execute all of them.

So I turned on the Profiler and observed that, for each procedure that I'm going to execute the first time, it's generated a big SQL command to get the parameters of the Stored Procedure. If I use the borland standard driver, instead of generate a big SQL command, its execute a Stored Procedure "sp_procedure_params_rowset" to get the parameters, and in that case it takes about 1 second to execute all of the Procedures.


My doubts are:
1) Is there a way of not executing the SQL command before execute a procedure?
2) Is there a way to change this big SQL command for the Stored Procedure "sp_procedure_params_rowset".

thanks in advance.

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Re: Some doubts using StoredProcedure?

Post by Ikar » Tue 23 Nov 2004 12:15

These additional queries are generated by OLE DB. Current DbxSda version doesn't provide ability to avid this problem, but we are planning to optimize the execution at the nearest version.

Post Reply