What is an expensive SQL statement?
An expensive SQL statement is a database access that shows high values in areas like:
- High execution time: Usually most important in the area of performance analysis are SQL statements with a particular high overall runtime. Usually the overall runtime counts, so it doesn't matter if a statement is executed 1 time with a duration of 1000 seconds or if it is executed 1 million times with an average duration of 1 ms, because in both cases the statement is responsible for a total duration of 1000 seconds.
- High memory utilization
- High CPU consumption
- High lock wait time