VS2010 Load Test using WebTest
Basically, you create a functional test sample of work.
Since my application is a webApp, I then have to extract a value from the querystring which I then set up as dynamic variable using a webTest.
Then I include a data source to use in place of the dynamic variable.
Then I include all this in a load Test and enable sqltrace in the loadtest config (built into the tool) but you need sysadmin access on that server I think to run the trace.
Then it outputs the times in a summary.
I normally use the results in the sqltrace which outputs the Queries above a specified threshold.
I sort that by logical reads and then copy the query into sql
view execution plan and then quickly trace where tablescans are happening.
This does not mean that an index must be added immediately.
What then happens is investigate the current index structure and see why we are doing a table scan. Could be erroneously created index.
Alternatively, the proc may need to be refactored. e.g., Order by createdDate column can be replaced with order by RID cos they are both ever increasing which implies that if date2>date1 then RID2>RID1.
Catch-all queries done right Gail Shaw's Performance Blog