Using Bitmap Index over db link.

I've a problem with the following query:
select count(*)
from TABLE_A@db_link TABLE_A, TABLE_B
where TABLE_A.ACCEPTTIME = TABLE_B.TIME_B
The above query is doing a full table scan (even after forcing index hints) on TABLE_A which has about 300M records.
TABLE_A is a local table while TABLE_B is remotely accesed using db_link.
There is a bitmap index created on the ACCEPT_TIME field of TABLE_A which is not used by the query. However when I fire this query:
Am I missing something here? How can I make the optimizer use the bitmap index on TABLE_A using remote db_link?
Here is the explain plan for the above query:
Operation     Object Name     Rows     Bytes     Cost     Object Node     In/Out     PStart     PStop
SELECT STATEMENT
Optimizer Mode=ALL_ROWS          1           2                     
SORT AGGREGATE          1      17                          
NESTED LOOPS          1      17      2                     
REMOTE     .COPY_STM     1      9      2
     STAG_PLMSPDB1.SMART.COM.PH     SERIAL          
INDEX RANGE SCAN     SYSTEM.DIM_TIME_INDX1     1      8      0                     
Regards,
Raj

Here is a simple case to explain the problem more clearly:
1. dept: database1 (small table dimension with 4 rows)
2. emp: database2 (large table fact with 50K rows)
3. Table emp has bitmap index on column "deptno"
4. Both tables are analyzed with defualt values using DBMS_STATS.GATHER_TABLE AND INDEX STATS
5. DB Link db2 is created from database1 to database2
Observations:
a) On Database2 when the following query is issued:
select count(*) from emp@DATABASE1 emp, dept where emp.deptno = dept.deptno
It does not use the bitmap index.
b) On Database1 when the following query is issued:
select count(*) from emp emp, dept@DATABASE2 where emp.deptno = dept.deptno
It does use the bitmap index since it is available optimizer has this information locally.
My question is how can I make use of the statistics effectively, so that the optimizer knows it has to use the bitmap index present in the remote db.
Regards,
Raj

Similar Messages

  • Can downloaded oracle9i Enterprise Edition use Bitmap index?

    Hello there,
    I have a downloaded Oracle9i Enterprise Edition. After I create some bitmap index on a partitioned table, I use the following sql statement to check the bitmap index:
    select index_name, index_type, status from user_index;
    It tells me that all the statuses of the bitmap indexes are "N/A" (Not availabe). Does that mean I can NOT use bitmap index in this downloaded Enterprise version?
    If I must use bitmap indexes, what should I do?
    Many thanks in advance!
    -wendy

    are you creating a local index on the partitioned table?

  • Peformance tuning of query using bitmap indexes

    Hello guys
    I just have a quick question about tuning the performance of sql query using bitmap indexes..
    Currently, there are 2 tables, date and fact. Fact table has about 1 billion row and date dim has about 1 million. These 2 tables are joined by 2 columns:
    Date.Dateid = Fact.snapshot.dates and Date.companyid = fact.companynumber
    I have query that needs to be run as the following:
    Select dates.dayofweek, dates,dates, fact.opened_amount from dates, facts
    where Date.Dateid = Fact.snapshot.dates and Date.companyid = fact.companynumber and dates.dayofweek = 'monday'.
    Currently this query is running forever. I think it is joining that takes a lot of time. I have created bitmap index on dayofweek column because it's low on distinctive rows. But it didn't seem to speed up with the performance..
    I'd like to know what other indexes will be helpful for me.. I am thinking of creating another one for companynumber since it also have low distinctive records.
    Currently the query is being generated by frontend tools like OBIEE so I can't change the sql nor can't I purge data or create smaller table, I have to what with what I have..
    So please let me know your thoughts in terms of performance tunings.
    Thanks

    The explain plan is:
    Row cost Bytes
    Select statement optimizer 1 1
    nested loops 1 1 299
    partition list all 1 0 266
    index full scan RD_T.PK_FACTS_SNPSH 1 0 266
    TABLE ACCESS BY INDEX ROWID DATES_DIM 1 1 33
    INDEX UNIQUE SCAN DATES_DIM_DATE 1 1
    There is no changes nor wait states, but query is taking 18 mins to return results. When it does, it returns 1 billion rows, which is the same number of rows of the fact table....(strange?)That's not a bitmap plan. Plans using bitmaps should have steps indicating bitmap conversions; this plan is listing ordinary btree index access. The rows and bytes on the plan for the volume of data you suggested have to be incorrect. (1 row instead of 1B?????)
    What version of the data base are you using?
    What is your partition key?
    Are the partioned table indexes global or local? Is the partition key part of the join columns, and is it indexed?
    Analyze the tables and all indexes (use dbms_stats) and see if the statistics get better. If that doesn't work try the dynamic sampling hint (there is some overhead for this) to get statistics at runtime.
    I have seen stats like the ones you listed appear in 10g myself.
    Edited by: riedelme on Oct 30, 2009 10:37 AM

  • How to use bitmap index

    when we will use bitmap index in oracle?

    hi,
    you can take a look this documents
    http://dylanwan.wordpress.com/2008/02/01/bitmap-index-when-to-use-it/
    http://www.oracle.com/technetwork/articles/sharma-indexes-093638.html
    regards,

  • Simple SQL Query is not using Bitmap index

    Hello to All,
    We are having Oracle9i Database and using it for the datawarehouse purpose.
    I have created the bitmap index on calledinfo column and I am running the following simple query which takes serveral hours to complete:
    select * from ssp.ssp_2006_q4 where calledinfo='799992515f'
    OR
    select calledinfo from ssp.ssp_2006_q4 where calledinfo='799992515f'
    I don't know why it is not using the bitmap index: Can anybody help me here?
    Thanks in Advance
    Hashim

    I know why and everyone that has read Jonathan Lewis' book on the CBO knows why.
    Why? Because the CBO thinks the cost of using your index will be higher than the cost of ignoring it.
    To see what Oracle is thinking run an explain plan using DBMS_XPLAN for create the output and then rerun it with a hint forcing index usage.
    It is a mistake to believe that an index will always make things better. Issues of cardinality, clustering factor, etc. are very important.
    Post the explain plans if you have any questions about what they show:
    http://www.psoug.org/reference/explain_plan.html

  • Ora-600 using table function over db link

    Hi,
    I have a table function n my target schema (OWB 9.2.0.4 on Oracle 9.2.0.5) with the following signature:
    function uii_get_exchange_data_tf(
    p_input_values in sys_refcursor
    ) return uii_exchange_table_t pipelined
    When I try to use this with a remote table over a db link, e.g.:
    =============
    select * from table(uii_get_exchange_data_tf(cursor (select sub_zone || '/' || exch_grp_cd exchange_id,
    exch_name exchange_name FROM cds_exchange_test@uiid1@uiidraconn order by exchange_id)))
    ==============
    I get this:
    ================
    ORA-00600: internal error code, arguments: [kokbnp2], [942], [], [], [], [], [],
    ORA-06512: at "UII_ODS_OWNER_DEV.UII_GET_EXCHANGE_DATA_TF", line 21
    =================
    However, if I create a local view with the same remote select like this:
    ===================
    CREATE OR REPLACE FORCE VIEW UII_CDS_EXCHANGE_RV
    AS SELECT sub_zone || '/' || exch_grp_cd exchange_id,
    exch_name exchange_name
    FROM cds_css_exch_detail@uiid1@uiidraconn;
    ====================
    Then everything works fine.
    Can someone help ? I'm sure I'm dooing something silly, since so many people seem to be using table functions from OWB just fine; but I can't figure out what :-(
    Thanks in advance.
    Regards,
    Biswa.

    Hello,
    Is this query works fine without creating mview
    SELECT COL1,COL2, CASE when COL3 = Y then (select X from MASTER2@DBLINK) FROM MASTER1@DBLINK.
    try something like this
    SELECT col1, col2, CASE
                          WHEN col3 = y
                          THEN
                             (SELECT x
                              FROM master2@dblink)
                       END
                          my
    FROM master1@dblinkregards

  • Using firefox, scrolling over a link does nothing, but using IE on the same link I see an .aspx file that I can open. How do I fix firefox?

    Going to a state sponsored site I see a link (underlined and in blue), but scrolling over it while in Firefox does nothing. Clicking on the link also does nothing.
    Changing browsers to IE, I then go to the same site and scrolling over link changes cursor. Clicking on the link opens a new page.
    The link's address is an .aspx file.
    How can I fix Firefox to view this link.

    Thanks for the try, but no help.
    I tried removing the "style", but it did absolutely nothing.
    I did notice something odd.
    Going to the state site:
    http://ww2.doh.state.fl.us/IRM00PRAES/PRASINDI.ASP?LicId=295&ProfNBR=3101
    there is a link "Going to complaint", when I scroll over this it reacts normally and clicking allows me to open a new page, BUT, the page is not in the browser, rather it appears to be a new window floating over the browser. This window has no address, it appears to be a separate document rather then a part of the website. In this window document there is a link, underlined and in blue, under the heading "case number". There is no way to remove style from this window, and clicking in Firefox does nothing, while doing so in IE leads me to a PDF document.
    I am a neophyte computer user, but wonder if there is something additional needed so Firefox can handle the .aspx file.

  • IMPLEMENTATION OF BITMAP INDEXING

    I have a question regarding implementation of BitMap Indexing.
    While using BitMap Indexing over a low cardinality column in a table having huge records (say 5 Million), what would be the approaches to reach to the record in the table that are stored in the file.
    For example supoose in a query we have a condition
    "gender = 'M'"
    Now if we apply BitMap Index over column "Gender" and select couple of records through masking Can anybody suggest a better approach so that corresponding records can be selected.
    Wait for an intelligent reply from Masters.
    Thanks.

    Guessing...
    You 'index' the data and create 'groups' which already match each bit.
    Obviously this can get complicated when the data changes. You either have to re-index at some time. You can do it immediately, or you can do it at some other interval. The first is an obvious performance problem. The second requires that you keep an un-indexed cache.

  • Why to use a bitmap index

    I've read that it may be usefull to create a bitmap index on low cardinality columns. And this is my doubt. Let's suppose I have a gender column on a table. This certainly has got a very low cardinality 'cause I can only have M or F in it and so it could be a column to create a bitmap index on. The question is: does it make sense to create an index on such a column since probably I had better to make a full scan table having 50% of probabilities of finding a record with gender = 'F' or = 'M' rather than using an index? What I mean is that it doesn't seem to make sense creating an index on a low cardinality column, regardless of traditional or bitmap index, am I right? Therefore why and when should I learn to use bitmap indexes?
    Thanks!

    The power of bitmap indexes comes when you can combine multiple bitmaps.
    Thus, if you have multiple query predicates on the same table ANDed together, and each has a bitmap index that can be used, the optimizer can choose to do a BITMAP AND on the indexes.
    If your table has a Gender column (and only 2 (or 3 ?)) genders and queries will be only by Gender, a Bitmap index to fetch rows from the table wouldn't help. The Bitmap index can still be used to do a COUNT by Gender.
    Updating the Bitmap index on Gender would be an expensive operation so you should plan to NOT have a high rate of concurrent DML.
    Hemant K Chitale

  • Trying to make use of bitmap indexes

    Hello!
    I have a table that contains about 16 mill rows and each night about
    60.000-70.000 rows are proccessed against the table so that part of the rows
    is updated and another part is inserted.
    The table contains three IDEAL columns for bitmap indexes the first of which
    may have only two, the second three and the third four distinct values.
    I was planning to change the index type on these columns to BITMAP but
    Oracle doesnt recommend to build BITMAP indexes on heavily updated or inserted
    columns.
    So the only use of bitmap indexes turns out to be read-only tables.
    From the other hand a sloution might be dropping indexes before the load and rebuilding them after the load has completed what can lead to often tablespace fragmentations.
    So, the question is how can I use bitmap indexes in a case like this one?
    What are wayouts?
    Thank you very mcuh for the reply.

    >
    The table contains three IDEAL columns for bitmap indexes the first of which
    may have only two, the second three and the third four distinct values.
    Contrary to popular legend, and possibly contrary even to the manuals and Metalink, these columns are NOT necessarily ideal for bitmap indexes. Consider a query with:
        col1 = '1_of_2'
    and col2 = '1_of_3'
    and col3 = '1_of_4'You have a total of 24 possible combinations. Given your 16M rows, this means that on average the optimizer will expect to collect about 670.000 rows spread across something like 100,000 to 130,000 blocks. Under these circumstances you may find that Oracle doesn't use the indexes anyway (unless you fool it by fiddling with parameters like the optimizer_index_cost_adj, and that's generally a bad idea) - and if the model is a reasonable description of the actual data it probably shouldn't use the indexes.
    There are various special circumstance that might make the indexes effective for querying, though. (Note - at this point I'm not considering the impact on inserts, updates and deletes). The most obvious example is where all three columns each have at least one very repetitive value and all your queries are trying to find data for the remaining "rare" values. If this is the case then you need to index the columns and collect histograms on the columns so that the optimiser can model the data correctly; and then you may also need to modify your SQL to ensure that your queries against these columns always use literal values, not bind variables.
    If some of your queries are supposed to return small amounts of data, there are various mechanisms you could use to do this efficiently. If your queries are always going to return large amounts of data, then there are other strategies that are likely to be more appropriate.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk

  • Multi-column BITMAP index vs. multiple BITMAP indices?

    Given the table (simple, made-up example):
    CREATE TABLE applicant_diversity_info (
    applicant_diversity_id NUMBER(12), PRIMARY KEY(applicant_diversity_id),
    apply_date DATE,
    ssn_salted_md5 RAW(16),
    gender CHAR(1), CHECK ( (gender IS NULL OR gender IN ('M','F')) ),
    racial_continent VARCHAR2(30), CHECK ( (racial_continent IS NULL
    OR racial_continent IN ('Europe','Africa','America','Asia_Pacific')) ),
    ethnic_supergroup VARCHAR2(30), CHECK ( (ethnic_supergroup IS NULL OR ethnic_supergroup IN ('Latin American','Other')) ),
    hire_salary NUMBER(11,2),
    hire_month DATE,
    termination_salary NUMBER(11,2),
    termination_month DATE,
    termination_cause VARCHAR2(30), CHECK ( (termination_cause IS NULL
    OR termination_cause IN ('Resigned','Leave of Absence','Laid Off','Performance','Cause')) )
    Oracle (syntactically) allows me to create either one BITMAP index over all four small-cardinality columns
    CREATE BITMAP INDEX applicant_diversity_diversity_idx ON applicant_diversity_info (
    gender, racial_continent, ethnic_supergroup, termination_reason );
    or four independent indexes
    CREATE BITMAP INDEX applicant_diversity_gender_idx ON applicant_diversity_info ( gender );
    CREATE BITMAP INDEX applicant_diversity_race_idx ON applicant_diversity_info ( raceial_continent );
    etc.
    What is the difference between the two approaches; is there any meaningful difference in disk-space between the one multi-colum index and the four single-column indexes? Does it make a difference in what the query-planner will consider?
    And, if I define one multi-column BITMAP index, does the order of columns matter?

    >
    What is the difference between the two approaches; is there any meaningful difference in disk-space between the one multi-colum index and the four single-column indexes? Does it make a difference in what the query-planner will consider?
    And, if I define one multi-column BITMAP index, does the order of columns matter?
    >
    You may want to read this two-part blog, that answers that exact question, by recognized expert Richard Foote
    http://richardfoote.wordpress.com/2010/05/06/concatenated-bitmap-indexes-part-i-two-of-us/
    http://richardfoote.wordpress.com/2010/05/12/concatenated-bitmap-indexes-part-ii-everybodys-got-to-learn-sometime/
    As with many things Oracle the answer is 'it depends'.
    In short the same considerations apply for a concatenated index whether it is bitmap or b-tree: 1) will the leading column usually be in the predicate and 2) will most or all of the index columns be specified in the queries.
    Here are some quotes from part 1
    >
    Many of the same issues and factors in deciding to create a single, multi-column index vs. several, single column indexes apply to Bitmap indexes as they do with B-Tree indexes, although there are a number of key differences to consider as well.
    Another thing to note regarding a concatenated Bitmap index is that the potential number of index entries is a product of distinct combinations of data of the indexed columns.
    A concatenated Bitmap index can potentially use less or more space than corresponding single column indexes, it depends on the number of index entries that are derived and the distribution of the data with the table.
    >
    Here is the lead quote from part 2
    >
    The issues regarding whether to go for single column indexes vs. concatenated indexes are similar for Bitmap indexes as they are for B-Tree indexes.
    It’s generally more efficient to access a concatenated index as it’s only the one index with less processing and less throwaway rowids/rows to contend with. However it’s more flexible to have single column indexes, especially for Bitmap indexes that are kinda designed to be used concurrently, as concatenated indexes are heavily dependant on the leading column being known in queries.

  • How to create partitioned bitmap index in SQL Developer?

    I am running SQL Developer version 3.0.04.34 ; on Windows 7 (64 bit) against:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE     11.1.0.7.0     Production
    TNS for Linux: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - Production
    I am trying to create a bitmap index on a partitioned fact table which is part of a data warehouse. The index is in support of a single-column foreign-key to a dimension table. Heretofore, we had been using partitioned B-Tree indexes. According to the Data Warehousing Guide, we should consider using bitmap indexes for this purpose. Accordingly, I was trying to create such an index in our development environment. I used SQL Developer to edit the table, and attempted to create a bitmap index using the advanced screen from the index edit screen. I changed the partition type to "Local" from "None" using the radio button. When I attempt to save this change, I get an error message "A bitmap index cannot have a global partition". This happens whether or not I have assigned storage for the partitions. The index partition names are the ones used successfully for the existing B-tree indexes. I can create the SQL for the index creation by hand, but it would be simpler and easier to maintain if I could use SQL Developer.
    Any help on this issue would be appreciated.
    Vin Steele

    There is a radio button for index type in the New Index... dialog and in the index section of the edit table dialog.
    Which version of SQL Developer are you using?

  • Bitmap indexes and group by

    I'm trying to understand why Oracle 8.1.6 sometimes uses bitmap indexes sometimes not.
    Of course I have all the statistics, my bitmap indexes are valid and so on.
    The problem is this:
    - I have a customer table very very large
    - I have many columns with bitmap indexes
    - I run this statement:
    select education_key, count(*)
    from customer
    group by education_key
    and obtain a correct execution plan:
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=235 Card=5 Bytes=10)
    1 0 SORT (GROUP BY NOSORT) (Cost=235 Card=5 Bytes=10)
    2 1 BITMAP CONVERSION (COUNT)
    3 2 BITMAP INDEX (FULL SCAN) OF 'CL_EDU'
    with the use of the bitmap indexes (only five different values)
    - now I want to put a condition on a column
    which has a bitmap index.
    The new statement is:
    select education_key, count(*)
    from customer
    where age_key = 30
    group by education_key
    No join, only a scan of a sort of
    fact table. In this case Oracle
    doesn't use the bitmap index on
    education_key:
    0 SELECT STATEMENT Optimizer=CHOOSE (Cost=3458 Card=5 Bytes=20
    1 0 SORT (GROUP BY) (Cost=3458 Card=5 Bytes=20)
    2 1 TABLE ACCESS (BY INDEX ROWID) OF 'CUSTOMER' (Cost=3395 C
    ard=18296 Bytes=73184)
    3 2 BITMAP CONVERSION (TO ROWIDS)
    4 3 BITMAP INDEX (SINGLE VALUE) OF 'CL_AGE'
    With this execution plan Oracle has to
    read some blocks from the table when I
    think that using both the bitmap indexes
    the query is faster.
    Someone knows why Oracle has this
    behaviour? I'm trying to change
    many things (also altering statistics
    value), but it seems that with a
    condition Oracle doesn'use the bitmap
    index on the group by column.
    null

    Hi Michael, what is the address for the lasagne? ....
    In init.ora.parms I had 32Mb for bitmap index merge, I suppose it's enough, hovewer I have tried to increase it and nothing changes.
    I already use STAR_TRASFORMATION_ENABLED=TRUE.
    I have tried with different level of statistics (estimate, compute, also with very precise histograms), always the same
    behaviour. I have also tried to change, in a manual way, the statistics in order to change the Oracle behaviour but nothing ...
    For this particular statement even if I use the INDEX_COMBINE hint, I mantain the same execution plan.
    I use CHOOSE, FIRST_ROWS, ALL_ROWS: always the same behaviour.
    I think that Oracle is not able to use a bitmap index on a column involved in a group by when there is another condition in the select.
    Hovewer with bitmap indexes, I have many other problems (to read 1% of the table Oracle decides to make a full table scan even if there are the correct bitmap indexes ...).
    Many of them are solved using BITMAP_INDEX, but it's difficult to use it in a query tool like Discover or Business Objects because I have to fix the use of INDEX_COMBINE also in situation in which this use is not correct from a performance point of view.
    The life with the query optimizer is very hard!
    Thank you for your guesses

  • How BITMAP INDEX SINGLE VALUE returns rows ?

    Hi guys,
    here is piece from serial execution plan (display_cursor)
    | Id  | Operation                                        | Name                         | Starts | E-Rows | A-Rows |
    |  48 |                  PARTITION LIST ALL              |                              |   3712 |        |   4089K|
    |  49 |                   BITMAP CONVERSION TO ROWIDS    |                              |  40832 |        |   4089K|
    |  50 |                    BITMAP AND                    |                              |  40832 |        |  23708 |
    |* 51 |                     BITMAP INDEX SINGLE VALUE    | IDX1                         |  40832 |        |  26014 |
    |* 52 |                     BITMAP INDEX SINGLE VALUE    | IDX2                         |  40832 |        |  28076 |
    ...What does mean such difference in A-Rows in steps 50->49, from 23708 to 4089K.
    Do steps 51-52 return not regular rows but rows with bitmaps, which consist many regular rows?

    853118 wrote:
    here is piece from serial execution plan (display_cursor)
    What does mean such difference in A-Rows in steps 50->49, from 23708 to 4089K.
    Do steps 51-52 return not regular rows but rows with bitmaps, which consist many regular rows?First of all have you noticed that you have more than 40,000 starts of these operations accounted for? That explains why you see more than 1 "row" accounted for the "single value" operation. But to answer your question: Yes, a single value in a bitmap index will have one or more bitmap pieces, and each bitmap piece covers a range of ROWIDs with the bitmap (0 or 1) pattern that tells whether the value is stored in that row or not.
    So a single value of a bitmap can potentially return many, if not all rows of a table. The "rows" output in the A-Rows column for bitmap indexes is probably the number of bitmap pieces (sometimes also called "fragments" I think) and therefore can look pretty small in comparison to the rows actually accessed in the table based on the information extracted from those bitmap pieces.
    For more info, I recommend to have a look at Julian Dyke's presentation about bitmap index internals: http://www.juliandyke.com/Presentations/BitmapIndexInternals.ppt
    Also Greg Rahn has an interesting blog post that also covers the discrepancy between "rows" of a bitmap operation and "rows" of the corresponding table access: http://structureddata.org/2008/05/29/using-bitmap-indexes-effectively/
    Hope that helps,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    Co-author of the "OakTable Expert Oracle Practices" book:
    http://www.apress.com/book/view/1430226684
    http://www.amazon.com/Expert-Oracle-Practices-Database-Administration/dp/1430226684

  • Why bitmap index not working?

    I have a table containing 4.2M rows and 16 distinct fs_type_code. So I created a bitmap index ntr_fs_type_code_ind on the column. Then I run the query:
    update /*+ INDEX_COMBINE(NTR_FS_TYPE_CODE_IND) */ ntr_CORPALL_20050801 d
    set eqt_basket_id = NULL, index_weight = NULL
    where
    fs_type_code in ('EQGR','EQVG','EQDL')
    and eqt_basket_id = equity_symbol
    and index_weight = 0;
    I clearly tell optimizer to use the bitmap index. But it turns out the optimizer ignore the index and still use full table scan.
    When I created regular b-tree index, the same query (without hint) use index scan.
    Can anybody tell me why the bitmap index not working here?
    Thanks,

    <quote>I clearly tell optimizer to use the bitmap index</quote>
    You are clearly not doing it right (see bellow). But anyway …
    1. For frequently modified tables (OLTP type application) you may want to rethink the applicability of bitmap indexes …
    low cardinality in itself is not enough justification for using bitmap indexes.
    2. Your update statement may modify a minority, a majority, or anything in between of the total number of
    rows in your table … here is no one universal access method which is always better
    (if there were one they wouldn’t have bothered with coding the rest).
    In short, index access is not always the better way.
    3. Don’t rush into hinting (because that optimizer is such a lousy piece of software) …
    and if you do, make sure you do it correctly and for the right reasons.
    flip@FLOP> create table t as select * from all_objects;
    Table created.
    flip@FLOP> insert into t select * from t;
    30043 rows created.
    flip@FLOP> insert into t select * from t;
    60086 rows created.
    flip@FLOP> insert into t select * from t;
    120172 rows created.
    flip@FLOP> insert into t select * from t;
    240344 rows created.
    flip@FLOP> create bitmap index tx on t (object_type);
    Index created.
    flip@FLOP> exec dbms_stats.gather_table_stats(user,'T',method_opt=>'for all indexed columns',cascade=>true)
    PL/SQL procedure successfully completed.
    flip@FLOP> select object_type,count(*) from t group by rollup(object_type);
    OBJECT_TYPE          COUNT(*)
    CONSUMER GROUP             32
    DIRECTORY                  32
    EVALUATION CONTEXT         16
    FUNCTION                 1648
    INDEX                   23152
    INDEX PARTITION          2048
    INDEXTYPE                 128
    JAVA CLASS             163024
    JAVA RESOURCE            3120
    LIBRARY                   224
    LOB                        16
    MATERIALIZED VIEW          32
    OPERATOR                  464
    PACKAGE                  5488
    PACKAGE BODY               32
    PROCEDURE                 640
    SEQUENCE                  144
    SYNONYM                202512
    TABLE                   18816
    TABLE PARTITION           880
    TRIGGER                  4768
    TYPE                    10640
    TYPE BODY                  16
    VIEW                    42816
                           480688
    flip@FLOP> set autotrace on explain
    update few rows … CBO goes with the index … no hinting
    flip@FLOP> update t d set object_id=object_id-1 where object_type in ('INDEX','PACKAGE','PACKAGE BODY','TABLE');
    47488 rows updated.
    Elapsed: 00:00:09.02
    Execution Plan
       0      UPDATE STATEMENT Optimizer=CHOOSE (Cost=536 Card=47488 Bytes
              =1044736)
       1    0   UPDATE OF 'T'
       2    1     INLIST ITERATOR
       3    2       BITMAP CONVERSION (TO ROWIDS)
       4    3         BITMAP INDEX (SINGLE VALUE) OF 'TX'
    update lots of rows … CBO goes with the ft … no hinting
    flip@FLOP> update t d set object_id=object_id-1 where object_type in ('JAVA CLASS','SYNONYM');
    365536 rows updated.
    Elapsed: 00:00:25.04
    Execution Plan
       0      UPDATE STATEMENT Optimizer=CHOOSE (Cost=638 Card=365536 Byte
              s=8041792)
       1    0   UPDATE OF 'T'
       2    1     TABLE ACCESS (FULL) OF 'T' (Cost=638 Card=365536 Bytes=8
              041792)
    update lots of rows … wrong hint syntax … CBO goes with the ft
    flip@FLOP> update /*+ index_combine(tx) */ t d set object_id=object_id-1 where object_type in ('JAVA CLASS','SYNONYM');
    365536 rows updated.
    Elapsed: 00:00:21.00
    Execution Plan
       0      UPDATE STATEMENT Optimizer=CHOOSE (Cost=638 Card=365536 Byte
              s=8041792)
       1    0   UPDATE OF 'T'
       2    1     TABLE ACCESS (FULL) OF 'T' (Cost=638 Card=365536 Bytes=8
              041792)
    update lots of rows … correct hint syntax … CBO goes with the index … but was it better than the ft?
    flip@FLOP> update /*+ index_combine(d tx) */ t d set object_id=object_id-1 where object_type in ('JAVA CLASS','SYNONYM')
    365536 rows updated.
    Elapsed: 00:00:25.01
    Execution Plan
       0      UPDATE STATEMENT Optimizer=CHOOSE (Cost=1665 Card=365536 Byt
              es=8041792)
       1    0   UPDATE OF 'T'
       2    1     INLIST ITERATOR
       3    2       BITMAP CONVERSION (TO ROWIDS)
       4    3         BITMAP INDEX (SINGLE VALUE) OF 'TX'
    flip@FLOP>

Maybe you are looking for