Talking about profiling and performance optimization is out of the scope of this book. In easy words, the profiling process consists of multiple analyses that investigate the structure and the content of the data, the processing time, and also make inferences about this information. After the analysis is complete, we can review the results and accept or reject the inferences. Basically, we use the profiling process to evaluate the quality of the data and the time taken to process this data. So, we can say that profiling is the primary means of measuring and analyzing where time is consumed.
When analyzing a profiling result, we aim to understand why a given server requires a certain amount of time to respond to a query and try to reduce or eliminate whatever unnecessary work it's doing to achieve the result. This is called optimization. In other words, we need to measure where the time goes in order to optimize it. The following figure illustrates the profiling process...