Some doubts using StoredProcedure?
Posted: 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.
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.