Bitmap indexes generated by procedure dbms_odn.createdimmv_gs

I run the procedure dbms_odn.createdimmv_gs for the dimension products_dim of schema sh, and I have the creation of the following index:
CREATE BITMAP INDEX MV_PRODU_PROD__OLAP_PREL_FI ON PRODU_PROD__OLAP
( (CASE SYS_OP_PARGID(GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID)
WHEN(7)
THEN TO_CHAR(SYS_OP_PAR(0, GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID))
WHEN(3)
THEN TO_CHAR(SYS_OP_PAR(1, GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID))
WHEN(1)
THEN TO_CHAR(SYS_OP_PAR(2, GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID))
ELSE TO_CHAR(SYS_OP_PAR(3, GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID)) END) )
TABLESPACE AGGR_IDX
PCTFREE 0
COMPUTE STATISTICS
LOCAL
NOLOGGING;
I would like to know if somebody know the function SYS_OP_PAR that is used inside this function based index. I make a research on Metalink but I haven't found anything.
Thanks.
Claude-Alain

I run the procedure dbms_odn.createdimmv_gs for the dimension products_dim of schema sh, and I have the creation of the following index:
CREATE BITMAP INDEX MV_PRODU_PROD__OLAP_PREL_FI ON PRODU_PROD__OLAP
( (CASE SYS_OP_PARGID(GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID)
WHEN(7)
THEN TO_CHAR(SYS_OP_PAR(0, GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID))
WHEN(3)
THEN TO_CHAR(SYS_OP_PAR(1, GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID))
WHEN(1)
THEN TO_CHAR(SYS_OP_PAR(2, GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID))
ELSE TO_CHAR(SYS_OP_PAR(3, GID, PROD_TOTAL, PROD_CATEGORY, PROD_SUBCATEGORY, PROD_ID)) END) )
TABLESPACE AGGR_IDX
PCTFREE 0
COMPUTE STATISTICS
LOCAL
NOLOGGING;
I would like to know if somebody know the function SYS_OP_PAR that is used inside this function based index. I make a research on Metalink but I haven't found anything.
Thanks.
Claude-Alain

Similar Messages

  • Unable to create a bitmap index

    Hi,
    I want to create a bitmap index on one of the colums on a table. I fired following query and it failed.
    SQL> CREATE BITMAP INDEX TRANS_N_BITMAPIDX_VEH_PLATFORM ON TRANSACTION_NEW(VEH_PLATFORM) LOCAL;
    Error starting at line 2 in command:
    CREATE BITMAP INDEX TRANS_N_BITMAPIDX_VEH_PLATFORM ON TRANSACTION_NEW(VEH_PLATFORM) LOCAL
    Error at Command Line:2 Column:70
    Error report:
    SQL Error: ORA-01408: such column list already indexed
    01408. 00000 -  "such column list already indexed"
    *Cause:   
    *Action:I found there is a combined NORMAL index with VEH_PLATFORM column called ‘IDX$$_30AA00021’. It has following columns
    •     VEH_PLATFORM
    •     VEH_MODEL
    •     MODL_YR_NBR
    •     VEH_MAKE
    •     TXN_PROCS_DT
    But I was able to create bitmap index on VEH_MODEL,MODL_YR_NBR and VEH_MAKE columns without any error.
    Why does it error out for VEH_PLATFORM column?
    Regards,
    Sam

    Hi,
    I am sure that BITMAP index is only created for
    VEH_MAKE
    VEH_MODEL
    MODL_YR_NBR
    BUILD_REGION
    VEH_LINE_SERIES
    TRANS_CTG_ID
    and not for VEH_PLATFORM.
    SQL> SELECT * FROM USER_INDEXES WHERE INDEX_TYPE='BITMAP' AND TABLE_NAME='TRANSACTION_NEW';
    INDEX_NAME                     INDEX_TYPE                  TABLE_OWNER                    TABLE_NAME                     TABLE_TYPE  UNIQUENESS COMPRESSION PREFIX_LENGTH          TABLESPACE_NAME                INI_TRANS              MAX_TRANS              INITIAL_EXTENT         NEXT_EXTENT            MIN_EXTENTS            MAX_EXTENTS            PCT_INCREASE           PCT_THRESHOLD          INCLUDE_COLUMN         FREELISTS              FREELIST_GROUPS        PCT_FREE               LOGGING BLEVEL                 LEAF_BLOCKS            DISTINCT_KEYS          AVG_LEAF_BLOCKS_PER_KEY AVG_DATA_BLOCKS_PER_KEY CLUSTERING_FACTOR      STATUS   NUM_ROWS               SAMPLE_SIZE            LAST_ANALYZED             DEGREE                                   INSTANCES                                PARTITIONED TEMPORARY GENERATED SECONDARY BUFFER_POOL FLASH_CACHE CELL_FLASH_CACHE USER_STATS DURATION        PCT_DIRECT_ACCESS      ITYP_OWNER                     ITYP_NAME                      PARAMETERS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               GLOBAL_STATS DOMIDX_STATUS DOMIDX_OPSTATUS FUNCIDX_STATUS JOIN_INDEX IOT_REDUNDANT_PKEY_ELIM DROPPED VISIBILITY DOMIDX_MANAGEMENT SEGMENT_CREATED
    TRANS_N_BITMAPIDX_MAKE         BITMAP                      VISUAL                         TRANSACTION_NEW                TABLE       NONUNIQUE  DISABLED                                                                                                                                                                                                                                                                                                                                                      2                      6102                   20                     305                     611                     12226                  N/A      12226                  2208                   11-MAY-11                 1                                        1                                        YES         N         N         N         DEFAULT     DEFAULT     DEFAULT          NO                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       YES                                                       NO         NO                      NO      VISIBLE                      N/A            
    TRANS_N_BITMAPIDX_MODEL        BITMAP                      VISUAL                         TRANSACTION_NEW                TABLE       NONUNIQUE  DISABLED                                                                                                                                                                                                                                                                                                                                                      2                      11284                  158                    71                      144                     22813                  N/A      22813                  2321                   11-MAY-11                 1                                        1                                        YES         N         N         N         DEFAULT     DEFAULT     DEFAULT          NO                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       YES                                                       NO         NO                      NO      VISIBLE                      N/A            
    TRANS_N_BITMAPIDX_BUILD_REGION BITMAP                      VISUAL                         TRANSACTION_NEW                TABLE       NONUNIQUE  DISABLED                                                                                                                                                                                                                                                                                                                                                      2                      2911                   5                      582                     1161                    5808                   N/A      5808                   5808                   11-MAY-11                 1                                        1                                        YES         N         N         N         DEFAULT     DEFAULT     DEFAULT          NO                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       YES                                                       NO         NO                      NO      VISIBLE                      N/A            
    TRANS_N_BITMAPIDX_MODL_YR_NBR  BITMAP                      VISUAL                         TRANSACTION_NEW                TABLE       NONUNIQUE  DISABLED                                                                                                                                                                                                                                                                                                                                                      2                      2911                   5                      582                     1161                    5808                   N/A      5808                   5808                   11-MAY-11                 1                                        1                                        YES         N         N         N         DEFAULT     DEFAULT     DEFAULT          NO                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       YES                                                       NO         NO                      NO      VISIBLE                      N/A            
    TRANS_N_BITMAPIDX_TRANS_CTG_ID BITMAP                      VISUAL                         TRANSACTION_NEW                TABLE       NONUNIQUE  DISABLED                                                                                                                                                                                                                                                                                                                                                      2                      7547                   43                     175                     359                     15457                  N/A      15457                  2345                   11-MAY-11                 1                                        1                                        YES         N         N         N         DEFAULT     DEFAULT     DEFAULT          NO                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       YES                                                       NO         NO                      NO      VISIBLE                      N/A            
    TRANS_N_BITMAPIDX_VEH_LINE_S   BITMAP                      VISUAL                         TRANSACTION_NEW                TABLE       NONUNIQUE  DISABLED                                                                                                                                                                                                                                                                                                                                                      2                      10581                  253                    41                      84                      21477                  N/A      21477                  2247                   11-MAY-11                 1                                        1                                        YES         N         N         N         DEFAULT     DEFAULT     DEFAULT          NO                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       YES                                                       NO         NO                      NO      VISIBLE                      N/A            
    6 rows selectedRegards,
    Sam

  • BW, BRTools, statistics, monitoring and bitmap indexes.

    Hi all, I have a question about the above.
    Oracle 10.2, Solaris 10, BW 7.00
    We have a script that generates statistics weekly on our systems.  lately, I have been noticing the following messages in the output after the BRTools statistics job is run:
    BR0988W Bitmap index "Index_name" selected for checking statistics - please activate the monitoring attribute for table "Table_name"***
    After reading SAPNotes 442395, 588688 & 408527, doing searches of SAPNotes, this forum and other forums such as ITToolbox, the answer to the above is "activate monitoring for the above/all tables".  I get this.
    My issue is that after seeing warnings or missing/skipped statistics, I will manually run the following
    brconnect -u / -c -f stats -t all -p 4 as the SID_ORA user
    When I do that, the warning message (BR0988W) does not appear in the output.  And if I check the table in Oracle with something like the following:
    select tablespace_name, table_name, partitioned, monitoring from all_tables where table_name = '"Table_name"';
    The ouput is
    TABLESPACE_NAME                TABLE_NAME                     PAR MON
    "Tablespace_name"                 "Table_name"                   YES YES
    which shows that monitoring is activated for the table.
    My question is, by running "brconnect -u / -c -f stats -t all -p 4" was monitoring turned on?  This would mean that I would not have to run the script suggested in 408527.  Or can the BR0988W error be generated even though monitoring is activated.
    The next time I see the error in the statistics output, I will run the SQL and check the status of the table before running the BRTools stats update.
    Table_name and Index_name are just generic markers.  I have checked and confirmed that I have not mistyped actual names when running select statements.

    As far as i know this message is outdated with 10g.
    Please have a look at this discussion: DB13 - Update Sttats - activate the monitoring attribute for table
    Cheers Michael

  • 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 does OWB deal with bitmap indexes when inserting?

    How does OWB 9.2 deal with bitmap indexes on a fact table when records are inserted from a staging table? It seems to me that they are left on the table, while in the 9i Server manuals it says that one should not perform heavy DML in this case, because this slows down the inserts considerably and the indexes can get bloated. Should one define a premapping and postmapping process for removal and recreation of the bitmap indexes?
    How handles OWB bitmap indexes in case of PEL and what action should one take then?
    Jaap.

    Hai Japp,
    It depends on the volume of the data.
    The best way is drop index in pre mapping process and recreate it in post mapping process.
    You need to use EXECUTE IMMEDIATE command in the procedure to create or drop indexes.
    e.g:
    EXECUTE IMMEDIATE 'CREATE BITMAP INDEX INDX_BI_TABLE ON TABLE_NAME(COL_NAME)'
    Regards,
    Malli

  • 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>

  • Estimation of Local Partitioned Bitmap Index size in Oracle

    Its datawarehousing project and the we have around 20 partitioned dimensional tables . The requirement is to create local partitioned bitmap index on almost all columns of dimension tables excluding primary key columns as they are already indexed.We need to estimate the size of index partitionwise.
    Please let me have if there is any ready piece of script which will help me in estimating size of bitmap local partitioned index.

    You may want to look into the DBMS_SPACE.CREATE_INDEX_COST procedure.
    Usage Notes* The table on which the index is created must already exist.
    * The computation of the index size depends on statistics gathered on the segment.
    * It is imperative that the table must have been analyzed recently.
    * In the absence of correct statistics, the results may be inaccurate, although the procedure will not raise any errors.

  • Diff b/w btree and bitmap index ?

    What is the difference between btree and bitmap index ?
    which one to used and when.
    how they are differ from each other.

    you'd love to see
    http://www.oracle.com/technology/pub/articles/sharma_indexes.html

  • 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.

  • Bitmap index Vs B-Tree index

    Hi All,
    Could some one please let me know how Bitmap indexes are useful compared to B-Tree indexes on low-cardinality columns ?.
    Thanks,
    -Kumar.

    >>
    As Re: why oracle db 9i optimizer can't choose to use the bitmap index? there are a number of issues with bitmap indexes. Your best bet is to read these three articles by Jonathan Lewis.
    It does pay us to understand how the optimizer works with bitmap indexes. I posted some Re: Cost-based optimizer behavior to show how indexes on even very low valued columns can be useful in certain circumstances.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Partitioned IOT of Object Type - mapping table not allowed for bitmap index

    Hi,
    looks like a feature available for standard Partitioned IOTs is not supported for object based tables, namely the MAPPING TABLE construct to support secondary local bitmap indexes.
    Can you confirm behaviour is as expected/documented?
    If so, is a fix/enhancement to support mapping table for object-based Partitioned IOTs in the pipeline?
    Results for partition-wise load using pipelined table function are very good, look-ups across tens of millions of rows are excellent.
    Environment = Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    OS = Oracle Enterprise Linux Server release 5.2 (Carthage) 2.6.18 92.el5 (32-bit)
    Here's the potted test-case...
    1) First the non object based Partitioned IOT - data is range-partitioned across the alphabet
    CREATE TABLE IOT_Table (
    textData VARCHAR2(10),
    numberData NUMBER(10,0),
    CONSTRAINT IOT_Table_PK PRIMARY KEY(textData))
    ORGANIZATION INDEX MAPPING TABLE PCTFREE 0 TABLESPACE Firewire
    PARTITION BY RANGE (textData)
    (PARTITION Text_Part_A VALUES LESS THAN ('B') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_B VALUES LESS THAN ('C') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_C VALUES LESS THAN ('D') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_D VALUES LESS THAN ('E') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_E VALUES LESS THAN ('F') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_F VALUES LESS THAN ('G') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_G VALUES LESS THAN ('H') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_H VALUES LESS THAN ('I') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_I VALUES LESS THAN ('J') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_J VALUES LESS THAN ('K') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_K VALUES LESS THAN ('L') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_L VALUES LESS THAN ('M') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_M VALUES LESS THAN ('N') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_N VALUES LESS THAN ('O') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_O VALUES LESS THAN ('P') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_P VALUES LESS THAN ('Q') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Q VALUES LESS THAN ('R') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_R VALUES LESS THAN ('S') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_S VALUES LESS THAN ('T') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_T VALUES LESS THAN ('U') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_U VALUES LESS THAN ('V') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_V VALUES LESS THAN ('W') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_W VALUES LESS THAN ('X') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_X VALUES LESS THAN ('Y') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Y VALUES LESS THAN ('Z') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Z VALUES LESS THAN (MAXVALUE) PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0))
    NOLOGGING PARALLEL -- FLASHBACK ARCHIVE IOT_Flashback_Data
    SQL> table IOT_TABLE created.
    2) Create the local secondary bitmap index utilising the underlying mapping table
    CREATE BITMAP INDEX IOT_Table_BMI1 ON IOT_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL;
    SQL> bitmap index IOT_TABLE_BMI1 created.
    3) Quick test to confirm all ok
    SQL> INSERT INTO IOT_Table VALUES ('ABC123',100);
    SQL> 1 rows inserted.
    SQL> SELECT * FROM IOT_Table;
    TEXTDATA NUMBERDATA
    ABC123     100
    4) Now create a minimal object type to use as the template for object table
    CREATE TYPE IOT_type AS OBJECT
    textData VARCHAR2(10 CHAR),
    numberData NUMBER(10,0)
    ) FINAL
    SQL> TYPE IOT_type compiled
    5) Attempt to create an object-based range partitioned IOT, including MAPPING TABLE clause as per step (1)
    CREATE TABLE IOTObj_Table OF IOT_type (textData PRIMARY KEY)
    OBJECT IDENTIFIER IS PRIMARY KEY ORGANIZATION INDEX
    MAPPING TABLE -- we'd like to use this feature to enable use of Bitmap Indexes...
    PCTFREE 0 TABLESPACE Firewire
    PARTITION BY RANGE (textData)
    (PARTITION Text_Part_A VALUES LESS THAN ('B') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_B VALUES LESS THAN ('C') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_C VALUES LESS THAN ('D') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_D VALUES LESS THAN ('E') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_E VALUES LESS THAN ('F') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_F VALUES LESS THAN ('G') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_G VALUES LESS THAN ('H') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_H VALUES LESS THAN ('I') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_I VALUES LESS THAN ('J') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_J VALUES LESS THAN ('K') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_K VALUES LESS THAN ('L') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_L VALUES LESS THAN ('M') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_M VALUES LESS THAN ('N') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_N VALUES LESS THAN ('O') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_O VALUES LESS THAN ('P') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_P VALUES LESS THAN ('Q') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Q VALUES LESS THAN ('R') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_R VALUES LESS THAN ('S') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_S VALUES LESS THAN ('T') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_T VALUES LESS THAN ('U') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_U VALUES LESS THAN ('V') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_V VALUES LESS THAN ('W') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_W VALUES LESS THAN ('X') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_X VALUES LESS THAN ('Y') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Y VALUES LESS THAN ('Z') PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0),
    PARTITION Text_Part_Z VALUES LESS THAN (MAXVALUE) PCTFREE 0 TABLESPACE Firewire Storage (Initial 10M Next 1M PCTIncrease 0))
    NOLOGGING PARALLEL -- FLASHBACK ARCHIVE IOT_Flashback_Data
    This errors out with the following...
    SQL Error: ORA-25182: feature not currently available for index-organized tables
    25182. 00000 - "feature not currently available for index-organized tables"
    *Cause:    An attempt was made to use one or more of the following feature(s) not
    currently supported for index-organized tables:
    CREATE TABLE with LOB/BFILE/VARRAY columns,
    partitioning/PARALLEL/CREATE TABLE AS SELECT options,
    ALTER TABLE with ADD/MODIFY column options, CREATE INDEX
    *Action:   Do not use the disallowed feature(s) in this release.
    6) Re-running the create table statement in step 5 without the MAPPING TABLE clause works fine. Not surprisingly an attempt to create a secondary local bitmap index on this table fails as there's no mapping table, like so...
    CREATE BITMAP INDEX IOTObj_Table_BMI1 ON IOTObj_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL;
    CREATE TABLE with LOB/BFILE/VARRAY columns,
    partitioning/PARALLEL/CREATE TABLE AS SELECT options,
    ALTER TABLE with ADD/MODIFY column options, CREATE INDEX
    *Action:   Do not use the disallowed feature(s) in this release.
    CREATE BITMAP INDEX IOTObj_Table_BMI1 ON IOTObj_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL
    Error at Command Line:99 Column:13
    Error report:
    SQL Error: ORA-00903: invalid table name
    00903. 00000 - "invalid table name"
    7) Creating a secondary local b-tree index is fine, like so...
    SQL> CREATE INDEX IOTObj_Table_I1 ON IOTObj_Table (numberData)
    LOCAL STORAGE (INITIAL 1M PCTINCREASE 0 NEXT 512K) NOLOGGING PARALLEL;
    index IOTOBJ_TABLE_I1 created.
    8) A quick test to ensure object table ok...
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('DEF456',500));
    SQL> 1 rows inserted.
    SQL> SELECT * FROM IOTObj_Table;
    TEXTDATA NUMBERDATA
    DEF456     500

    Thanks Dan,
    the intention is to range partition based on the initial character, so A* -> Text_Part_A, B* -> Text_Part_B, and so on.
    Here's an example, using an empty IOTObj_Table as created previously.
    1) Set up & confirm some test data (two 'D's, one 'N', and two 'Z's)
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('DEF456',500));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('DDD111',510));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('N3000',515));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('ZZ1212',520));
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('Z111X',530));
    SQL> COMMIT;
    SQL> SELECT * FROM IOTObj_Table;
    TEXTDATA NUMBERDATA
    DDD111     510
    DEF456     500
    N3000     515
    Z111X     530
    ZZ1212     520
    2) Just to prove our IOT is enforcing the Primary Key based on the TextData attribute, try to insert a duplicate
    SQL> INSERT INTO IOTObj_Table VALUES (IOT_Type('Z111X',530));
    Error starting at line 141 in command:
    INSERT INTO IOTObj_Table VALUES (IOT_Type('Z111X',530))
    Error report:
    SQL Error: ORA-00001: unique constraint (OCDataSystems.SYS_IOT_TOP_84235) violated
    00001. 00000 - "unique constraint (%s.%s) violated"
    *Cause:    An UPDATE or INSERT statement attempted to insert a duplicate key.
    For Trusted Oracle configured in DBMS MAC mode, you may see
    this message if a duplicate entry exists at a different level.
    *Action:   Either remove the unique restriction or do not insert the key.
    3) Now confirm that our data has been slotted into the range-based partition we expect using the PARTITION clause of SELECT...
    - The two 'D's...
    SQL> SELECT * FROM IOTObj_Table PARTITION (Text_Part_D);
    TEXTDATA NUMBERDATA
    DDD111     510
    DEF456     500
    - The single 'N'...
    SQL> SELECT * FROM IOTObj_Table PARTITION (Text_Part_N);
    TEXTDATA NUMBERDATA
    N3000     515
    - The two 'Z's...
    SQL> SELECT * FROM IOTObj_Table PARTITION (Text_Part_Z);
    TEXTDATA NUMBERDATA
    Z111X     530
    ZZ1212     520
    4) And to wrap up confirm an empty partition
    SELECT * FROM IOTObj_Table PARTITION (Text_Part_W);

  • Does dropping bitmap index and creation of b- index cause any dead locks

    Does dropping a bitmap index on table which is being used continuously for DML operations and creation of b- index cause any dead locks on a table
    in oracle 10g database
    ( 10.1.0.4.0 - 64bi).
    we have seen alert log file which has dead lock occurrence.. would index change/re-creation resulted dead lock or some other reason?
    Could you please give us info or help us on this.. thanks in advance..

    Bitmap indexes can be the cause of deadlocks on busy systems.
    Dropping indexes may cause some locking.
    Creating indexes may cause some locking.
    You haven't given any traces or scripts or lock information, so difficult to say which one (if any) was the cause of your deadlocks.
    It would be better to do this activity when the system is not busy.

  • Creation of bitmap index taking long time

    Hi
    I have OLTP compression enabled on the table
    CREATE BITMAP INDEX
    I1 ON
    T1(
    col 1Asc
    NOLOGGING TABLESPACE ts_index01
    taking very long time.
    The wait event is : cell single block physical read.
    Any ideas what I can do?
    Thank u

    Hi Marc
    thanks for your answer. The issue is this is a cOTS product(Siebel Analytics). The indexes are created by DAC(Informatica) automatically. I do not have away to "create index index_name parallel degree 24" clause in there.
    Thanks

  • Select count from large fact tables with bitmap indexes on them

    Hi..
    I have several large fact tables with bitmap indexes on them, and when I do a select count from these tables, I get a different result than when I do a select count, column one from the table, group by column one. I don't have any null values in these columns. Is there a patch or a one-off that can rectify this.
    Thx

    You may have corruption in the index if the queries ...
    Select /*+ full(t) */ count(*) from my_table t
    ... and ...
    Select /*+ index_combine(t my_index) */ count(*) from my_table t;
    ... give different results.
    Look at metalink for patches, and in the meantime drop-and-recreate the indexes or make them unusable then rebuild them.

  • 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?

Maybe you are looking for

  • Lost connection to photoshop in bridge

    I have had full cc for a year... installed all the 2014 aps... erased the original aps.... when I click on a jpeg or nef in Bridge, it opens it in Picas... Picasa was installed after my 2014 installations and the removal of my old cc files... There i

  • ITunes 10.4 and Windows 7 bug thread

    I thought I would start an entire thread devoted to iTunes 10.4 and Windows 7 bugs since there are MANY people reporting various issues and may not know about all of them. Hopefully this will combine a list of all bugs for reference and help others.

  • IPad not an HDCP compliant display device?

    The TV show Castle was purchased via iTunes and originally watched on an Apple TV. Synced it to the iPad and it gives a "This movie could not be played." message. Attempted to play it on the Mac Pro and I get the message: "This movie cannot be played

  • FB03:  Report that identifies which ACCTG Documents have PDF's attached?

    Hello Friends- I have an usual request.  When my accounting team executes journal entries, they attach a PDF for every transaction.  When audited, they discovered several document numbers where the user forgot to add the PDF.  Is there a report or a

  • Making a synonym valid....in Ora10g

    Hi, I have searched the on-line doc of Oracle10g ... but i have not found which privilege should one db user must have in order to compile a public synonym..... Can you please write it down ...??? Thanks... Sim