Nuwan Wajirasena(110607D) edited section_Query_Optimization_in_Oracle__.tex  about 8 years ago

Commit id: b80ec75a7497c28c4679bb637504ca164aca976b

deletions | additions      

       

\subsection{Purpose of the Query Optimizer}  Query optimizer generates the ideal execution for a SQL statement in order to get thethe  data with the minimum cost.This would take I/O,communication and CPU into consideration consideration.  The execution method is dependent on the size of the data set and also the structure of the data set. Query optimizers job is to find the best execution method by considering the above mentioned factors and also the internal access methods. \subsection{Cost-Based Optimization}  Cost is calculated with reference to the number of resources used for a single query. In this context I/O, CPU , memory and number of rows returned are considered to be resources.There can be multiple ways that resources can be allocated for a query call, the optimiser optimizer  would assign costs for each methodology and pick the one with the lowest cost. Decision on the same query might change with the Oracle version, this is due to the fact that newer versions have more information compared to the older versions. \subsection{Execution Plan}