1. Select the appropriate Oracle Optimizer
There are 3 types of Oracle Optimizer:
A. Rule (rule-based) B. Cost (based on costs) c. CHOOSE (selectivity)
The default optimizer can be set by various declarations of the Optimizer_mode parameter in the Init.ora file, such as Rule,cost,choose,all_rows,first_rows. You can certainly overwrite it at the SQL sentence level or at the session level.
In order to use the cost-based optimizer (CBO, cost-based Optimizer), you must frequently run the Analyze command to increase the accuracy of the object statistics (objects statistics) in the database.
If the optimizer mode of the database is set to selective (CHOOSE), then the actual optimizer mode will be related to whether the Analyze command has been run. If the table has been analyze, the optimizer mode will automatically become the CBO, whereas the database will use the rule-form optimizer.
By default, Oracle uses the Choose Optimizer, and to avoid unnecessary full table scans, you must try to avoid using the Choose Optimizer directly, using either a rule-based or cost-based optimizer.
2. How to Access table
ORACLE uses two ways to access records in a table:
A. Full table scan
A full table scan is the sequential access to each record in the table. Oracle optimizes full-table scanning in a way that reads multiple data blocks (database block).
B. Accessing the table through ROWID
You can use ROWID-based access to improve the efficiency of your Access tables, ROWID contains the physical location information that is recorded in the table. Oracle employs an index to achieve the connection between data and the physical location (ROWID) where the data resides. Usually the index provides a quick way to access rowid, so those queries based on indexed columns can get a performance boost.
http://www.bkjia.com/PHPjc/631042.html www.bkjia.com true http://www.bkjia.com/PHPjc/631042.html techarticle 1. Choose the right Oracle Optimizer for Oracle, there are 3 types of optimizer: A. Rule (based on rules) b. Cost (based on costs) c. CHOOSE (optional) Set the default optimizer, you can pass the Init.ora ...