![]() |
The Optimizer![]() ![]() ![]() ![]() ![]()
A optimizers is the part of an ORACLE kernel that chooses the best way to use the tables and indexes to complete the request made by a SOL statement. Optimization is an important step in the processing of any Data Manipulation Language statement (SELECT, INSERT UPDATE or DELETE). Whenever such a statement is issued, ORACLE must determine how to execute the statement. There may be many different ways for ORACLE to execute a single statement. A part of ORACLE called the optimizer choose one of these ways. The goal of the optimizer is to choose the most efficient way to execute a SOL statement. The optimizer considers a number of factors to make what is usually the best choice among its alternatives. However, an application designer usually knows more about a particular application's data than the optimizer could possibly know. Why use the Optimizer? For every SQL statement, the Oracle optimizer generates an execution plan, which is a serious of steps that Oracle takes to execute the statement. Because you know more about the application data than the optimizer does, you can suggest to Oracle the way to optimize a SQL statement. Oracle's Approaches to Optimization To choose an execution plan for a SQL statement, the optimizer uses one of these approaches: 1. Rule-based
Using the rule-based approach, the optimizer chooses an execution plan based on the access paths available. This approach chooses execution plans based 'on heuristically-ranked operations. If there is more than one way to execute a SQL statement, the rule-based approach always uses the operation with the lower rank. In most cases, operations of lower rank execute faster than those associated with constructs of higher rank.
This approach consists of three steps: 1. Using the cost-based approach, the optimizer generates a set of potential execution plans for the statement based on its available access paths and hints. The optimizer estimates the cost of each execution plan based on the data distribution and storage characteristics for the tables, Clusters, and indexes in the data dictionary. 2. The cost is the estimated value proportional to the elapsed time needed to execute the statement using the execution plan. The optimizer calculates the cost based on the estimated computer resources including but not limited to 1/0, CPU time, and memory required to execute the statement using the plan. Execution plans with greater costs take more time to execute than those with smaller costs. 3. The optimizer compares the costs of the execution plans and chooses the one with the smallest cost. Goal of the Cost-Based Approach By default, the goal of ' the cost-based approach is the best throughput, or minimal elapsed time necessary to process all rows accessed by the statement.
|
|
Domain NamesSQL Database Management Systems Relational Database Management System Properties of RDBMS Client Server Computing Oracle Relational Database Database Structure and Space Management SQL Data Types How to Use Data Types? What is Operators and Conditions Character OperatorsOperator Precedence Data Retrieval Using SQL Plus SQL Data Definitions Data Retrieval Using Select SQL Operator Precedence Selecting Rows and Columns The Group by Clause
Having Clause Union, Union all, Intersact and Minus Commands Playing with Numbers Date Functions Example of Date Arithmetic Working with Null Values
Joining Tables and Subqueries Views Synonyms Indexes Clusters Sequences Formatting Query Results with SQL Plus Data Integrity The Optimizer How Oracle Optimizes SQL Statements Evaluating Expression and ConditionsOptimization Hints PL-SQL PL-SQL Architecture Error Reporting Functions Character Functions Composite Data Types PL-SQL Structures How to use PL-SQL Structures Normalization Operator Precedence Cursor Error Handling Database Triggers Types of Triggers Locking Sub Programs Packages New and Improved Data Types Improved Select Statement Advanced Quering Improved Scalability Improved Performance Via Partitioning Object Relational Features Heterogeneous Data Access Improved Security Administration New Data Types Improved Select Statement Changes to the Select Statement Improved Scalability Data Partitioning Oriented Toward Objects Character Functions Creating Object Types Created Nested Tables Oracle8 and Distributed Database Oracle8 Database Management and Security Distributed Database Invoking Export Invoking ImportWeb DesignWeb HostingE Commerce |
| Home | Web Hosting | Web Design | Sitemap |
| Copyright (C) 2007. Web Domain design hosting. All rights reserved. |