locked
Testing retrieval rates RRS feed

  • Question

  • User-544808552 posted

    I have a query that I want to test the performance of when the query is included directly in the SqlDataSource versus when I call a stored procedure.  Does anyone have suggestions on how I would be able to closely watch the actual steps here?  I was thinking of turning on tracing and adding Trace.Write for each of the events that fire along the way.  This doesn't seem efficient and I wanted to see if there was a better approach.

    Wednesday, February 16, 2011 4:16 PM

Answers

  • User1224194097 posted

    test the performance of when the query is included directly in the SqlDataSource versus when I call a stored procedure.

    If you are trying to check execution time in your code, you can use System.Diagnostics.StopWatch. Use DataSource select method to get data using query and do the samething with the procedure. That should give you exact execution time to compare performance.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 16, 2011 4:42 PM

All replies

  • User1224194097 posted

    test the performance of when the query is included directly in the SqlDataSource versus when I call a stored procedure.

    If you are trying to check execution time in your code, you can use System.Diagnostics.StopWatch. Use DataSource select method to get data using query and do the samething with the procedure. That should give you exact execution time to compare performance.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 16, 2011 4:42 PM
  • User-544808552 posted

    Great I'll look at that one. Thanks.

    Wednesday, February 16, 2011 7:37 PM