[quoted text, click to view] >> Can I prevent SQL Server from running sp_Execute? Becauase it slows my
>> app.
You cannot, since it is invoked internally & you have no control over it.
However you can look to other considerations which may speed up your
application.
If you are calling multiple stored procedures for retrieving data for a
single interface, consider consolidating them into one; you can handle
multiple resultsets both in ADO as well as with ADO.NET ( assuming you use
one of them ). This can multiple trips to the server by reducing network
traffic. Cache reuse for frequently used stored procedures can be a good
thing; in most cases since the execution plan can be reused directly from
the procedure cache. So you need not run the DBCC statements for each time.
Also, look into the stored procedures itself to see if there is any
bottlenecks. In many cases, retrieving thousands of rows to load a grid or
combobox on a client interface can be useless. Use proper WHERE clauses to
retrieve reasonable number of rows to the client. Also the usual checks, see
if the underlying tables are optimally indexed etc.
--
Anith