B
Brad P
Hi,
Our development team has encountered some performance problems when
using ADO.NET (using the SqlCommand and SqlDataAdapter objects) to
perform queries on large data tables. We've drilled into the issue
considerably, and the problem seems to be related to how ADO.NET uses
the SP_EXECUTESQL when running text queries. I say this because when we
run our query in Query Analyzer by itself the performance is less than
a second, but when running it with the SP_EXECUTESQL command (which is
what Profiler is telling us is being used), it takes nearly half a
minute.
Functions (UDFs) that call UDFs, Group By statements, and Aggregate
functions that are not necessarily good for dynamic cursors (or at
least that is what I have heard), so the issue seems to make sense.
Anyways, what I was wondering was whether or not there is a way to have
ADO.NET run our query without using SP_EXECUTESQL. If this is not
possible, then I am interested in knowing whether or not it is a bad
practice to have UDFs calling other UDFs, as opposed to having a larger
query that does all the work but is not as reusable.
Thanks for your time
Our development team has encountered some performance problems when
using ADO.NET (using the SqlCommand and SqlDataAdapter objects) to
perform queries on large data tables. We've drilled into the issue
considerably, and the problem seems to be related to how ADO.NET uses
the SP_EXECUTESQL when running text queries. I say this because when we
run our query in Query Analyzer by itself the performance is less than
a second, but when running it with the SP_EXECUTESQL command (which is
what Profiler is telling us is being used), it takes nearly half a
minute.
execute the command it is given. Our query involves User DefinedFrom what I know about SP_EXECUTESQL, it uses dynamic cursors to
Functions (UDFs) that call UDFs, Group By statements, and Aggregate
functions that are not necessarily good for dynamic cursors (or at
least that is what I have heard), so the issue seems to make sense.
Anyways, what I was wondering was whether or not there is a way to have
ADO.NET run our query without using SP_EXECUTESQL. If this is not
possible, then I am interested in knowing whether or not it is a bad
practice to have UDFs calling other UDFs, as opposed to having a larger
query that does all the work but is not as reusable.
Thanks for your time