Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository Oracle
  • pvm_pre_change.sql Oracle
  • sbind.sql Find Bind variable from sql_id sqlid Oracle
  • configUOCIOTTO.ora Oracle
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • DB Console Mainenance. Oracle
  • The most important Tuning Notes Oracle
  • find the files that are 1 day old. Linux/Unix
  • scripts to take listener.log backup Linux/Unix
  • initUOCIOTTO.ora Oracle
  • Committing distributed transaction using commit force Oracle
  • Jai Shree Ram Oracle
  • how to find OS block size Oracle
  • Running some SQL on multiple databases connecting using monitoring userid and password Linux/Unix
  • CTAS with LONG Column for 7.x and 8 and 8i Oracle

Optimizer_Index init.ora parameter explaination.

Posted on 01-Dec-2005 By Admin No Comments on Optimizer_Index init.ora parameter explaination.

For Index ( Range Scan and Fast Full Scan Setings )in query

(1) RULE uses index range scan

(2) CBO uses Index fast full scan ( called Index FFS )

Here CBO uses multi block IO reading as per db_file_multi_block_read_count). By default, the CBO costs physical IO and logical IO the same. So it ignores the

following facts.

(A) The index range scan will be all logical IO.

(B) Now Index FFS uses Multi-block IO, so causes less physical IO compare to Index range scan. Hence the cost it gives to the FFS on the small index is

artificially low (conversely, the cost of the index range scan is artificially high).

There are 2 init.ora parameter that affects this settings.

Parameter-1 optimizer_index_caching :

————————————-

percentage of blocks expected to be found in the buffer cache during an index hit. default of 0 implies that every (logical) LIO is a (physical) PIO.

Property Description

—————————–

Parameter type Integer

Default value 0

Modifiable ALTER SESSION, ALTER SYSTEM

Range of values 0 to 100

OPTIMIZER_INDEX_CACHING lets you adjust the behavior of cost-based optimization to favor nested loops joins and IN-list iterators.

The cost of executing an index using an IN-list iterator or of executing a nested loops join when an index is used to access the inner table depends on the

caching of that index in the buffer cache. The amount of caching depends on factors that the optimizer cannot predict, such as the load on the system and the

block access patterns of different users.

You can modify the optimizer’s assumptions about index caching for nested loops joins and IN-list iterators by setting this parameter to a value between 0

and 100 to indicate the percentage of the index blocks the optimizer should assume are in the cache. Setting this parameter to a higher value makes nested

loops joins and IN-list iterators look less expensive to the optimizer. As a result, it will be more likely to pick nested loops joins over hash or

sort-merge joins and to pick indexes using IN-list iterators over other indexes or full table scans. The default for this parameter is 0, which results in

default optimizer behavior.

A value of 100 infers that 100% of the index blocks are likely to be found in the buffer cache and the optimizer adjusts the cost of an index probe or nested

loop accordingly. Use caution when using this parameter because execution plans can change in favor of index caching.

Parameter -2 optimizer_index_cost_adj

————————————-

Property Description

—————————–

Parameter type Integer

Default value 100

Modifiable ALTER SESSION, ALTER SYSTEM

Range of values 1 to 10000

Represents relative cost of PIO’s for indexed access vs full scan. Default value of 100 indicates that an indexed access is just as costly as a full access.

On many systems (most oltp casual query systems) — the default values for these parameters are totally wrong. The default of 100 for cost adj is way too

high. The default of 0 for index caching is way too low.

The default value is 100, which means that indexes are evaluated as an access path based on the normal costing model. A value of 10 means that the cost of

an index access path is one-tenth the normal cost of an index access path.

that OPTIMIZER_INDEX_CACHING should be set to 90 and OPTIMIZER_INDEX_COST_ADJ should be set to a value which usually ranges between 10 and 50 for most online

transaction processing (OLTP) systems.

Full scans will be used when a range scan cannot. fast full scans will be used to avoid a full scan of the base table itself.

Oracle chooses index full scan instead of range scan and the performance was poor compared with range scan. I think the problem was with Clustering Factor it

was almost as high as number of rows. An index full scan is a RANGE scan in the grandest sense. It is a range scan from the beginning to the end.

Oracle, SQL scripts

Post navigation

Previous Post: CTAS with LONG Column for 9i and higher
Next Post: SQLPLUS COPY command Precautions.

Related Posts

  • FRA Information. Oracle
  • Does DBMS_JOB recompute the NEXT_DATE interval after or before Oracle
  • run this before doing any dbchange pvm_pre_change.sql Oracle
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • Multiple listeners Oracle
  • v$backup.status information Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • rm_backup_arch_file.ksh Linux/Unix
  • PLSQL Table Syntax 2 Oracle
  • EXTPROC Oracle
  • Which environment is used by currently running process ( Very good) Linux/Unix
  • TRUNCATE Privs Oracle
  • UTL_FILE test program Oracle
  • compile_inv.sql Oracle
  • ORACLE_SID in sqlplus Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme