Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug DataSet performance

I have a dataset in a Visual Studio 2010 Web App project which accesses the DB with a complex SQL statement. If I run the statement in SQL Management Studio directly, it loads in a less than a second. If however, I run it using the "Preview Data" button in the dataset designer, or I try to access it on a page (with a gridview for example), it takes over 40 seconds!

What steps should I take to track down what's causing this huge delay when working with the dataset?

like image 306
just.another.programmer Avatar asked Dec 13 '25 01:12

just.another.programmer


1 Answers

There are two cases:

  • Problem is on Application Level
  • Problem is on Data Base level, actually a SQL query itself

So as first step try to exclude one of the cases, much easier from my perspectives is to debug SQL side:

  1. Run Sql Profiler
  2. Run query from Management Studio
  3. Save profiler logs
  4. Clear profiler logs
  5. Run "Preview DataSet"
  6. Compare execution logs and see whether any difference in SQL
like image 197
sll Avatar answered Dec 15 '25 16:12

sll



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!