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 ...

Get Database Systems: Concepts, Design and Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.