Sometimes, a query doesn't behave as expected: it either doesn't return what it should or takes longer than desired. When this happens, you need to profile it.
We will talk about four options to test profile your queries:
The next sections will cover tools that will help you in watching the output, measuring the performance, and debugging your queries.
You have a couple of options when it comes to profiling; first, it is usually helpful to look at the SQL that is being sent to the database. ...