SQL Server Query Performance Test

Hello Experts,

I have created an application using ASP.NET and SQL Server as my DB. I was wondering how I could test the speed of my queries and also how I can determine what a good query speed should be.

I'm knew to testing queries in SQL so please be patient :)

I want to be proactive and make sure that my queries are fast and not slow.
Who is Participating?
With ASP you can do something similar to the following:

    DateTime startTime = DateTime.Now;

    /* YOUR QUERY. */
    DateTime stopTime = DateTime.Now;

    TimeSpan executionTime = stopTime - startTime;

Open in new window

the value of the executionTime variable is your query execution time which you can display or do with as you please.
All Courses

From novice to tech pro — start learning today.