11.5. Query Optimization
The primary goal of query optimiser is of choosing an efficient execution strategy for processing a query. The query optimiser attempts to minimise the use of certain resources (mainly the number of I/Os and CPU time) by choosing the best of a set of alternative query access plans. Query optimization starts during the validation phase by the system to validate whether the user has appropriate privileges. Existing statistics for the tables and columns are located, such as how many rows (tuples) exist in the table and relevant indexes are found with their own applicable statistics. Now an access plan is generated to perform the query. The access plan is then put into effect with the execution plan of generated during query ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access