When we jump into performance of our application. Its essential to track which of the code segment is taking more time. To track the time taken by your code or your query you can use System.Diagnostics.Stopwatch instance before execution started of the specific code. And after completion of the code execution calculate the time elapsed. It will shows you the time taken by your application.