BC remote Oracle DBA - Call (800) 766-1884  
Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

 

 

 

 

The index_asc Hint

Oracle Tips by Burleson Consulting

The index_asc hint requests to use the ascending index on a range scan operation. Since this is the default behavior of the optimizers anyway, this hint has very limited use in SQL tuning.

The no_index Hint

The no_index hint forces the optimizer to ignore the presence of an index. The no_index hint is most commonly used in cases where you have determined that a parallel full-table scan will outperform an index range scan. This index is equivalent to the full hint and is rarely used in SQL tuning.

The index_desc Hint

The index_desc hint requests to use the descending index on a range scan operation. The index_desc hint gives better performance in cases where you are calculating the maximum values of a column with the max built-in function.

select /*+ index_desc(emp, sal_idx) */
   ename,
   max(salary)
from
   emp
;

Here we see that the index access method has changed from ascending to descending.

The index_combine Hint

The index_combine hint is used to force a bitmap access path for the table. If no indexes are given as arguments for the index_combine hint, the optimizer will choose whatever Boolean combination of bitmap indexes has the best costing estimate for the table access. The index_combine hint directs the optimizer to perform a ROWID intersection operation from both bitmaps (Figure 12-4). In practice, it is always a good idea to specify the table name and both index names in the hint.

Figure 4: A bitmap index merge execution

For example, assume the following bitmap indexes on the emp table:

create bitmap index
   dept_bit
on
   emp
   (deptno);

create bitmap index
   job_bit
on
   emp
   (job);

Now, let’s look at the query. Here we filter the result rows where job=salesman and deptno=30.

select
   ename,
   job,
   deptno,
   mgr
from
   emp
where
   job = 'SALESMAN'
and
   deptno = 30
;

Here is the execution plan. Please note that we are using a bitmap index on deptno and then filtering for the job rows:

OPERATION
----------------------------------------------------------------------
OPTIONS                        OBJECT_NAME                    POSITION
------------------------------ ---------------------------- ----------
 SELECT STATEMENT
                                                                     1
  TABLE ACCESS
BY INDEX ROWID                 EMP                                   1
    BITMAP CONVERSION
TO ROWIDS                                                            1
      BITMAP INDEX
SINGLE VALUE                   DEPT_BIT                              1

Now, we add the index_combine hint to our query.

select /*+ index_combine(emp, dept_bit, job_bit) */
   ename,
   job,
   deptno,
   mgr
from
   emp
where
   job = 'SALESMAN'
and
   deptno = 30
;

Here is the new execution plan:

OPERATION
----------------------------------------------------------------------
OPTIONS                        OBJECT_NAME                    POSITION
------------------------------ ---------------------------- ----------
 SELECT STATEMENT
                                                                     2
  TABLE ACCESS
BY INDEX ROWID                 EMP                                   1
    BITMAP CONVERSION
TO ROWIDS                                                            1
      BITMAP AND
        BITMAP INDEX
SINGLE VALUE                   DEPT_BIT                              1
        BITMAP INDEX
SINGLE VALUE                   JOB_BIT                               2

Here we see that the bitmap indexes are merged together with a BITMAP CONVERSION execution method. This bitmap merge method will dramatically reduce the execution time of queries on large tables.


This is an excerpt from "Oracle High-Performance SQL Tuning" by Donald K. Burleson, published by Oracle Press.


Expert Remote DBA

BC is America's oldest and largest Remote DBA Oracle support provider.  Get real Remote DBA experts, call
BC Remote DBA today.

 

 

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.



Hit Counter