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

Similar Messages

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

  • Unable to create the Rule Index (SEM_APIS.CREATE_RULES_INDEX) getting error

    Hi,
    I am trying to create the Rule Index with the below script its giving the temp table space error.
    The number of records in that specific table is 17473708 (17+ M) and the available temp space is 120GB.
    Execute SEM_APIS.CREATE_RULEBASE('ecc_md_rb')
    --Insert to mdsys.semr_ecc_md_rb Values(.............)
    BEGIN
    SEM_APIS.CREATE_RULES_INDEX(
    'ecc_rule_indx',
    SEM_Models('FOUNDATION'),
    SEM_Rulebases('RDFS','ecc_dm_rb'));
    END;
    Create rule index statement is running more than 8hrs and i tried with the sem_apis.create_entailment its also giving the same Temp table space error.
    Please find the below error details
    BEGIN sem_apis.create_entailment('ecc_rule_inx', sem_models('FOUNDATION'), sem_rulebases('OWLPRIME','ecc_dm_rb'),SEM_APIS.REACH_CLOSURE,'RDFS2-, RDFS3-, RDFS4a-, RDFS4b-, RDFS5-, RDFS6-, RDFS7-, RDFS8-, RDFS9-, RDFS10-, RDFS11-, RDFS12-, RDFS13-','USER_RULES=T'); END;
    Error at line 1
    ORA-29532: Java call terminated by uncaught Java exception: oracle.jdbc.driver.OracleSQLException: ORA-01652: unable to extend temp segment by 64 in tablespace TEMP
    ORA-06512: at "MDSYS.SDO_SEM_INFERENCE";, line 4866
    ORA-06512: at "MDSYS.RDF_APIS";, line 16
    ORA-06512: at line 1
    Please Help me to create rule index.
    Note: I am using Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    Regards,
    Kavitha.

    Hi,
    Please use the create_entailment API.
    As far as temp tablespace goes, please create a bigfile temp tablespace. You can follow Slide #36 of the
    following document.
    http://download.oracle.com/otndocs/tech/semantic_web/pdf/2010_ora_semtech_wkshp.pdf
    Thanks,
    Zhe Wu

  • Unable to Create the Secondary Index for ODS, Please..

    Hi All,
      The ODS 'A' has two Secondary Indexes ('010' & '020') and I want to create a third index with characteristics X & Y.  X is there in both '010' & '020' Indexes.
      RSA1 --> Info Provider --> Double click on ODS 'A' --> Right Click on last folder 'Indexes' --> Create --> '030' assigned by the system for the new Index.
      I am having all the Characteristics in the left window after clicking the InfoObject Catalog and Characteristics
      When I try to drag the 'X' from the left window to keep it under 'Indexes' folder or '030' Index, it gives 'NO'
    symbol (a circle with cross line). I am not able to find the cause. I could drag it on to 'Key fields' of 'Data Fields' , but not 'Indexex' folder. Am I doing something wrong, please ?
    Thanks,
    Venkat.

    This appeared in one of the earlier threads..
    I think u need to go to se11..there enter the name of the active table of the ODS..name will be../BIC/A<ODS tech name>00'.
    Once the table field appear after clicking display..
    u will see button 'indexes' on right hand top..
    click on that and then trying creating a new secondary index..
    cheers,
    Vishvesh

  • Unable to create function based Index

    Hi All,
    I created a function as below:
    create or replace function eqx_oklb_term_date_nvl(pin_term_date date)
    return date
    deterministic
    is
    l_sub_date date := sysdate+1;
    l_return_value date := l_sub_date;
    begin
    l_return_value := nvl(pin_term_date, l_sub_date);
    return l_return_value;
    exception
    when others
    then
    l_return_value := l_sub_date;
    return l_return_value;
    end eqx_oklb_term_date_nvl;
    Now trying to create a function based index using below code:
    create index EQX_OKC_K_LINES_B_N4 on OKC.OKC_K_LINES_B(EQX_OKLB_TERM_DATE_NVL(DATE_TERMINATED))
    logging
    tablespace EQIXDATA
    noparallel;
    Encountered Error:
    SQL Error: ORA-00904: "EQX_OKLB_TERM_DATE_NVL": invalid identifier
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action:
    I can successfully query dba_objects for the function.
    Owner Object_name object_id object_type last_ddl_time status
    APPS     EQX_OKLB_TERM_DATE_NVL     11764623     FUNCTION     3/4/2013 9:44:57 PM     VALID
    I can also query the function using dual.
    select eqx_oklb_term_date_nvl(null) nvl_date from dual;
    nvl_date
    3/5/2013 9:53:59 PM
    I have given grants of the function to both schemas APPS/OKC
    grant all on eqx_oklb_term_date_nvl to okc;
    grant all on eqx_oklb_term_date_nvl to apps;
    The column date_terminated in table okc_k_lines_b is a date. I've checked that.
    Stuck here. Please help.
    Thanks in advance,
    Rahul

    Hi,
    To follow up, the below code resolved the issue:
    create index EQX_OKC_K_LINES_B_N4 on okc_k_lines_b(apps.eqx_oklb_term_date_nvl(date_terminated))
    logging
    tablespace eqixdata
    noparallel;
    -- qualifying the custom function name with schema name resolved the issue.
    Thanks,
    Rahul

  • Bad performance "CREATE BITMAP INDEX"

    Hi,
    i just create a bitmap index on a fact table with ~90.000.000 entries. The indexed table is the artice dimension with a cardinality of about 900.000 articles.
    The process is running since 24 hours with a parallel degree of 4, 3 slaves finished their work, only one is still collecting/sorting. PGA_AGGREGATE_TARGET is 4 GB.
    Oralce has allocated a temporary segment in the temp. tablespace which has a size of 760 MB up to now.
    Any idea how to speed up the process except increasing the degree for parallel query ?
    Is there a space limit for processes allocating main memory in the PGA. Or is it absolutely impossible to setup Oracle memory for workareas in a way, so that such a big bitmap can be created in main memory ? I dont want to switch back to the 8i features CREATE_BITMAP_AREA_SIZE,...
    Any hint is welcome, thx in advance...
    Paul

    Hello,
    Please check <Bug:3048661>
    Hdr: 3048661 9.2.0.3.0 RDBMS 9.2.0.3.0 RAM INDEX PRODID-5 PORTID-23
    Abstract: CREATE BITMAP INDEXES TAKES LONGER IN 9203 WHEN PGA => 2GB
    Thanks
    Ashish

  • Error while attempting to create bitmap index

    I get the error below while creating a bitmap index on a table in SQL Developer.
    How do a go about enabling this feature? I looked on Tools | Preferences menu and didn't see anything.
    Using Version 1.0.0.14.67
    >>>
    Error starting at line 1 in command:
    CREATE BITMAP INDEX "SYSTEM"."PUB_SRC_INDX_0197_US4" ON "SYSTEM"."PUB_SRC_TBL_0197_US" ("STATUS_ID")
    Error report:
    SQL Error: ORA-00439: feature not enabled: Bit-mapped indexes
    >>>
    Thanks

    Nevermind.. I found it on google. You must have an SE version of Oracle which does not support Bitmapped Indexes. You will have to use another index type.

  • How to maintain bitmap index on a large table in DW?

    Hi all,
    We have many tables which are constantly doing either FULL or INCREMENTAL loading.
    And we have created many BITMAP indexes and several B*Tree index (caused by PRIMARY KEY or UNIQUE key constraints) on those tables.
    So, what I want to know is, how to maintain those BITMAP (and B*Tree) indexes for different loading mode?
    like, should I drop the index before the full load and re-create it after that?
    and do nothing in INCREMENTAL loading? I am aware that it will take more time to load with indexes.
    any links, books, articles or opinions would be highly appreciated.
    Thanks

    Just to reiterate, add to what Adam said. From Oracle Doc
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/indexes002.htm#CIHJIDJG
    Unusable indexes
    An unusable index is ignored by the optimizer and is not maintained by DML. One reason to make an index unusable is to improve bulk load performance. (Bulk loads go more quickly if the database does not need to maintain indexes when inserting rows.) Instead of dropping the index and later re-creating it, which requires you to recall the exact parameters of the CREATE INDEX statement, you can make the index unusable, and then rebuild it.
    You can create an index in the unusable state, or you can mark an existing index or index partition unusable. In some cases the database may mark an index unusable, such as when a failure occurs while building the index. When one partition of a partitioned index is marked unusable, the other partitions of the index remain valid.
    An unusable index or index partition must be rebuilt, or dropped and re-created, before it can be used. Truncating a table makes an unusable index valid.
    Beginning with Oracle Database 11g Release 2, when you make an existing index unusable, its index segment is dropped.
    The functionality of unusable indexes depends on the setting of the SKIP_UNUSABLE_INDEXES initialization parameter. When SKIP_UNUSABLE_INDEXES is TRUE (the default), then:
    •DML statements against the table proceed, but unusable indexes are not maintained.
    •DML statements terminate with an error if there are any unusable indexes that are used to enforce the UNIQUE constraint.
    •For nonpartitioned indexes, the optimizer does not consider any unusable indexes when creating an access plan for SELECT statements. The only exception is when an index is explicitly specified with the INDEX() hint.
    •For a partitioned index where one or more of the partitions are unusable, the optimizer does not consider the index if it cannot determine at query compilation time if any of the index partitions can be pruned. This is true for both partitioned and nonpartitioned tables. The only exception is when an index is explicitly specified with the INDEX() hint.
    When SKIP_UNUSABLE_INDEXES is FALSE, then:
    •If any unusable indexes or index partitions are present, any DML statements that would cause those indexes or index partitions to be updated are terminated with an error.
    •For SELECT statements, if an unusable index or unusable index partition is present but the optimizer does not choose to use it for the access plan, the statement proceeds. However, if the optimizer does choose to use the unusable index or unusable index partition, the statement terminates with an error.
    Incremental load really matters the volume and whether for new dats you just add new partitions or subpartitions . If my incremntal go all over place and/or if I am touching few thousand rows. Yes might want to keep the indexes valid and let Oracle maintain it. IF millions added or incremental data just added to new part/subpart . Keeping indexes unsable for those partitions/subpartitions and the rebuilding it later may yield better results.

  • 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

  • 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

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

  • Bitmap indexes have effect on query execution and equation of values.

    Hi,
    I have a Fact table and 17 dimension tables linked to it. On each foreign-key in the Fact-Table I have created a BITMAP Index. After that I Analyzed the fact table and made sure that the referential constraints were valid.
    Everything seem to be OK until I ran into a difference in totals when using the next 2 queries that should both result into the same total amount.
    Query 1:
    Below query is resulting in a wrong total amount and seems to be cartesian.
    SELECT    SUM(F.DOLLARS)
    FROM       SALES_FACTS         F
    ,               DIM_TIME                A
    ,               DIM_CUSTOMER      B
    ,               DIM_SALESAGENT  C
    ,               DIM_SALESTYPE     D
    ,               DIM_GEOGRAFIC     E
    WHERE    F.TIME_ID     =     A.TIME_ID
    AND         F.CUST_ID     =    B.CUST_ID
    AND         F.SA_ID         =    C.SA_ID
    AND         F.ST_ID          =   D.ST_ID
    AND         F.GEO_ID       =   E.GEO_ID
    AND         A.YEAR          =   '2006'
    AND         C.SALESNUM =   '3770'
    AND D.ST_ID <> '4'
    Query 2:
    Qeury 2 is the same as query 1 exept the the type of sales (D.ST_ID) is now set with in a range of allowed values. This query gives the correct result.
    SELECT    SUM(F.DOLLARS)
    FROM       SALES_FACTS         F
    ,               DIM_TIME                A
    ,               DIM_CUSTOMER      B
    ,               DIM_SALESAGENT  C
    ,               DIM_SALESTYPE     D
    ,               DIM_GEOGRAFIC     E
    WHERE    F.TIME_ID     =     A.TIME_ID
    AND         F.CUST_ID     =    B.CUST_ID
    AND         F.SA_ID         =    C.SA_ID
    AND         F.ST_ID          =   D.ST_ID
    AND         F.GEO_ID       =   E.GEO_ID
    AND         A.YEAR          =   '2006'
    AND         C.SALESNUM =   '3770'
    AND D.ST_ID in ('1','2','3','5') In my situation it seems that when I use the <> (not equal to) symbols in combination with the bitmap indexes, that the result of the sum becomes cartesian and thus incorrect.
    Has anyone an idea why the calculation of the total amount is different in both queries?
    Any help is very appreciated.
    Regards, Ilona

    Another strange effect is when I leave out the quotation around the not equal to 4 for the Sales_type id (ST_ID <> 4 in stead op ST_ID <> '4' ) then the totals is perfect.
    Query 1 version without quotations around ST_ID:
    SELECT    SUM(F.DOLLARS)
    FROM       SALES_FACTS         F
    ,               DIM_TIME                A
    ,               DIM_CUSTOMER      B
    ,               DIM_SALESAGENT  C
    ,               DIM_SALESTYPE     D
    ,               DIM_GEOGRAFIC     E
    WHERE    F.TIME_ID     =     A.TIME_ID
    AND         F.CUST_ID     =    B.CUST_ID
    AND         F.SA_ID         =    C.SA_ID
    AND         F.ST_ID          =   D.ST_ID
    AND         F.GEO_ID       =   E.GEO_ID
    AND         A.YEAR          =   '2006'
    AND         C.SALESNUM =   '3770'
    AND D.ST_ID <> 4 I still have no clue what causes this effect.
    Regards, Ilona

  • BITMAP index and BLEVEL

    Hi All,
    We have one BITMAP index on a flag column (Y/N).Table is non partitioned with 3.4 million records.
    Following are index stats.
    select INDEX_NAME,INDEX_TYPE,BLEVEL,LEAF_BLOCKS,DISTINCT_KEYS,CLUSTERING_FACTOR,NUM_ROWS,SAMPLE_SIZE,DEGREE FROM DBA_INDEXES WHERE
    INDEX_NAME='LATE_VER_FLG_CAX_IDX' AND OWNER='EQHUB'
    INDEX_NAME           INDEX_TYPE     BLEVEL LEAF_BLOCKS DISTINCT_KEYS CLUSTERING_FACTOR   NUM_ROWS SAMPLE_SIZE DEGREE
    LATE_VER_FLG_CAX_IDX BITMAP             11         716             2             72783      72783       72783 1
    select last_analyzed,sample_size,num_rows from dba_indexes where index_name='LATE_VER_FLG_CAX_IDX';
    LAST_ANALYZED      SAMPLE_SIZE   NUM_ROWS
    31.Jan.09/00:29:41       72783      72783
    NAME                      HEIGHT     BLOCKS    LF_ROWS    LF_BLKS LF_ROWS_LEN    BR_ROWS    BR_BLKS DEL_LF_ROWS DISTINCT_KEYS BTREE_SPACE USED_SPACE   PCT_USED
    LATE_VER_FLG_CAX_IDX          12       4352          0          0                      1          1           0             0        8028
    CREATE BITMAP INDEX "EQHUB"."LATE_VER_FLG_CAX_IDX" ON "EQHUB"."BBO_CORPORATE_ACTIONS" ("LATEST_VERSION_FLAG")
      PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
      STORAGE(INITIAL 65536 NEXT 2097152 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "ETDHUB_EQHUB_INDEX"
    SQL> select LATEST_VERSION_FLAG,count(*) from BBO_CORPORATE_ACTIONS group by LATEST_VERSION_FLAG;
    L   COUNT(*)
    N    2265303
    Y    1189116I am wondering
    1.What can be done to reduce index BLEVEL/HEIGHT? (i assume COALESCE will not help)..Should i rebuild the index?
    2.Why BTREE_SPACE is only showing 8028 where dba_segments is showing index size =34 MB?
    3.Why PCT_USED is NULL?
    Is that so BLEVEL/PCT_USED not relative for BITMAP Indexes?
    I found that no query is using this index for last 60 days and performance is getting degraded due to FTS.
    Should i REBUILD the index so that i can reduce BLEVEL/HEIGHT/INDEX_SIZE and improve query performance with INDEX ACCESS.
    Regards,
    Bhavik Desai

    Bhavik Desai wrote:
    You perfectely caught the DML pattern.There are 4 daily ELT jobs which INSERT 300 and UPDATE 250 records/execution.
    May i ask you,upon which observation,you point this?Also it would be greate if you tell me how did you calculate 67% PCT_FREE.
    This was based on the fact that an update to a single row in a table could result in a copy of an entire bitmap index chunk being made; so you need to leave a lot of space free in the leaf blocks to allow for these copies because you really don't want to cause an index leaf block split to occur - especially since that would tend to cascade up the index and cause a branch block split as well. On this basis, pctfree 51 should be adequate for most cases, but setting it to 67 (a) allows you to do a couple of updates/clones to the same chunk before you hit a problem, and (b) helps to keep the chunks smaller which helps to reduce the undo and redo a bit.
    This has just reminded me of a little detail - I am a little surprised by the fact that you got an index into this state in 10.2, because that release of Oracle seems to avoid creating a long chain of clones of the same index chunk when you do a series of small updates, and it is the chain of clones that results in branch blocks split running up the index and exploding it to an enormous height. Has this database been upgraded from 9i (or even 10.1) some time in the fairly recent past ?
    >
    I still dont understand,
    1.Why there is no difference in BTREE_SPACE?
    2.Why PCT_USED is NULL?
    I've just run a quick test on 10.2.0.1 and 10.2.0.3 creating a table with a y/n/null column and creating a bitmap index on it. The results from index_stats didn't match across versions, and the 10.2.0.3 stats were clearly garbage - very similar to yours. For the moment I would assume that something has been broken in 10.2.0.3 with this use of the validate command.
    >
    If we consider Franck Pachot's observation,then it would be better to convert the BITMAP to BTREE.Is this a normal bitmap behavior?Randolf's observation about the numbers of rows involved is most relevant: it doesn't look like an index that the optimizer should consider using for anything other than select flag, count(*), and changing from a bitmap to a btree won't make any difference. In other words, unless you can point to an important piece of code and say "it makes tis bit run much better" maybe the index shouldn't exist at all.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "The temptation to form premature theories upon insufficient data is the bane of our profession."
    Sherlock Holmes (Sir Arthur Conan Doyle) in "The Valley of Fear".

  • Does XE support Bitmap Indexes?

    Hi,
    I am trying to create a bitmap index in XE and getting the following error:
    ORA-00439: feature not enabled: Bit-mapped indexes
    I am guessing this is only available in the enterprise editions of the database or is there some way i can enable this option?
    thanks,
    Brenden

    I am guessing this is only available in the enterprise editions of the databaseBitmap indexes are enterprise only. You can find a full list of included and excluded functionality in the XE documentation.
    Cheers, APC

  • Local Bitmap Index Confusions

    Hi,
    I am using Oracle 10.2.0.3.0 on Solaris 5.10.
    I have a range based partition table with 60 partitions. This is a fact table. I have to load 60 days data in this table. I have created a partition for each day and the partition key is the date column. I created the table with partition, but didn't create the local bitmap index on the partition key vdate, because as far as I know oracle makes the local bitmap index unusable before the insert and then we have to rebuild it after the load. Is that right?
    So the better strategy is to first load the data in the partition and then create a local bitmap index on that partition, is that right?
    For instance, in future, some rows get inserted in an existing partition where the local bitmap index is present, so then I should once again rebuild the index on that partition, because in case of insert Oracle would have disabled it?
    In this table there is another column vactivity, which is a foreign key from a dimension. Many queries use this column in there where clause. I would also like to create a bitmap index on this column? On this non partitioned key column, the local bitmap index should be created. Is that right?
    Please also suggest as which is more faster, rebuilding a local bitmap index after rendering it unusable, or dropping and recreating it?
    Thanks and best regards

    The more I know, the more I know that how little I know. Thanks Jonathan for a very insightful answer. Please clarify some points and thanks for your valuable feedback.
    Jonathan Lewis wrote:
    Fahd Mirza wrote:
    Hi,
    I am using Oracle 10.2.0.3.0 on Solaris 5.10.
    I have a range based partition table with 60 partitions. This is a fact table. I have to load 60 days data in this table. I have created a partition for each day and the partition key is the date column. I created the table with partition, but didn't create the local bitmap index on the partition key vdate, because as far as I know oracle makes the local bitmap index unusable before the insert and then we have to rebuild it after the load. Is that right?
    That may depend on the software you use to load the data, it's not a necessity from the perspective of the database.I am using Oracle Warehouse Builder to load the data into the database.
    >
    So the better strategy is to first load the data in the partition and then create a local bitmap index on that partition, is that right?
    Depends on the tools, and whether there is data in the table already - but Oracle will optimise index maintenance for bulk inserts in a way which means that it isn't necessary to worry about dropping/recreating if the index already exists and the table is empty.There is no data in the partitions prior to loading.
    You may find that with one index it's more efficient to create the index with a lot of free space (51%, say) and leave it at that while another index works better if you mark unusable and rebuild.
    Would you please elaborate on this point?
    >
    >>
    In this table there is another column vactivity, which is a foreign key from a dimension. Many queries use this column in there where clause. I would also like to create a bitmap index on this column? On this non partitioned key column, the local bitmap index should be created. Is that right?
    Your question raise more questions:
    a) Does this mean you are only going to have a maximum of two bitmap indexes on this fact table with 60 million rows ? That doesn't sound like it's enough indexes.No, I will create local bitmap indexes on other columns too, which are likely to be used in the adhoc queries.
    b) Are you hoping that the vactivity bitmap index will protect you against foreign key locking ? It won't. This (in part) is why people tend to set FK's to disable, novalidate, rely in data warehouses, they want bitmap indexes not btree indexesActually I haven't created the FK constraint.
    d) Going back to the bitmap index on the date - is this column storing values that are date-only, or is it storing "date with time". If it's date-only then you've only got one date per partition and the index is a waste of space and processing overhead.The datatype of the column vdate is number. Actually it is refering to the pk of time dimension, in which we have preloaded the dates for the next ten years. Would the index be a total waste on this column?
    >
    >
    Please also suggest as which is more faster, rebuilding a local bitmap index after rendering it unusable, or dropping and recreating it?
    Here is the table. I have omitted many partitions for the sake of brevity:
    CREATE TABLE CDR
      CLNG_NMBR          NUMBER,
       CL_RFRNC_NMBR      VARCHAR2(100 BYTE),
      DT_KY              NUMBER,
      TM_KY              NUMBER,
      HRLY_KY            NUMBER,
    ACTVTY_KY          NUMBER,
      INS_DT             DATE,
      SRVC_ID            VARCHAR2(100 BYTE),
      MSC_ADRS           VARCHAR2(100 BYTE),
      TRF_ID             NUMBER,
      CL_TYP             NUMBER,
      LCTN_INFRMTN       VARCHAR2(100 BYTE),
      LCTN_KY            NUMBER,
      SRC_CLNG_NMBR      VARCHAR2(50 BYTE),
      ACTVTY_CL_TP       VARCHAR2(100 CHAR)
    PARTITION BY RANGE(DT_KY)
    PARTITION DAY_20DEC2009 VALUES LESS THAN (4153),
    PARTITION DAY_21DEC2009 VALUES LESS THAN (4154),
    PARTITION DAY_22DEC2009 VALUES LESS THAN (4155),
    PARTITION DAY_23DEC2009 VALUES LESS THAN (4156),
    PARTITION DAY_24DEC2009 VALUES LESS THAN (4157),
    PARTITION DAY_25DEC2009 VALUES LESS THAN (4158),
    PARTITION DAY_26DEC2009 VALUES LESS THAN (4159),
    PARTITION DAY_27DEC2009 VALUES LESS THAN (4160),
    PARTITION DAY_28DEC2009 VALUES LESS THAN (4161),
    PARTITION DAY_31DEC2011 VALUES LESS THAN (4894),
    PARTITION DAY_END_PART VALUES LESS THAN (MAXVALUE)
    TABLESPACE cdr
    PCTUSED    0
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    STORAGE    (
                INITIAL          80K
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    NOLOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;Many many thanks and best regards
    Fahd
    Edited by: Fahd Mirza on Jun 3, 2010 2:00 PM
    Edited by: Fahd Mirza on Jun 3, 2010 2:03 PM

Maybe you are looking for