Index BITMAP Advisor Advisor access SQL on the Partition key

I ran SQL and SQL Access Advisor as below he recommends index bitmap on p_key... Given that the cust table is partitioned on the p_key, does make sense to create indexes on p_key?

Not sure if SQL Access Advisor look just in ' where clause conditions/predicates "and the cardinality of such columns and not look at whether the table is partitioned or not. T it?

Is it wise to create BITMAP indexes on the partition key? If so what scenario would be beneficial?
SELECT * FROM cust
WHERE 
    'T' = 'T' AND 
    part_key IN 
    (   2, 3, 4 )) AND 
    (   p_key, act_key) IN ( select p_key, act_key from account where act_type = 'PENDING' and p_key in (2,3,4) )

user4529833 wrote:
Jonathan, I have exactly one value per partition for the partition key.   However, most SQLs use 'IN' as predicate of partitioning pruning so overall stats are always used and they are always a bit bland compared to the partition level stats. Then this led SQL Access advisor recommendations?

Yes, the Counselor also recommended to create Bitmap indexes on act_type... Given this does make sense to have the Bitmap index on the partition key?

I'll post the execution plan as soon as I have access to the system...

The fact that statistics are "a little stale" was not much of a difference.

The fact that Oracle has probably used statistics at the level of the tables is likely to be the underlying issue. Is the partitioned table list or you have rigged it with partitioning range: If you faked list partitioning using partitioning of the range which MAY have contributed to the issue (but it's an assumption that I have not tested).

Unofficially, the optimizer has said something like:

+ "There are 25 possible values for pkey, there are 4 possible values for act_type, there seems to be 100 different combinations - so your query will pick up X lines. 80% of these lines will be packed in Y blocks and 20% of them will be scattered through the Z blocks if we have two bitmap index, and we will have to do sequential reading of the db file SSS. If we do an analysis through the affected partitions, we do MMM db file scattered reads. What are those cheaper. » +

You know how false it's - if you know that you need not the pkey index. You also know what is the efficiency of the column act_type is in the identification of data, so you can decide whether or not an index on act_key may be useful.

Concerning
Jonathan Lewis
http://jonathanlewis.WordPress.com
http://www.jlcomp.demon.co.UK

"The premature temptation to theories of shape on the lack of data is the scourge of our profession."
Sherlock Holmes (Sir Arthur Conan Doyle) in "the Valley of fear."

Tags: Database

Similar Questions

  • What is the index that is created automatically on the partitioning key?

    What is the index that is created automatically on the partitioning key?
    CREATE TABLE sales
    ( prod_id NUMBER(6)
    , cust_id NUMBER
    , time_id DATE
    , channel_id CHAR(1)
    , promo_id NUMBER(6)
    , quantity_sold NUMBER(3)
    , amount_sold NUMBER(10,2)
    )
    STORAGE (INITIAL 100K NEXT 50K) LOGGING
    PARTITION BY RANGE (time_id)
    ( PARTITION sales_q1_2006 VALUES LESS THAN (TO_DATE('01-APR-2006','dd-MON-yyyy'))
    TABLESPACE tsa STORAGE (INITIAL 20K NEXT 10K)
    , PARTITION sales_q2_2006 VALUES LESS THAN (TO_DATE('01-JUL-2006','dd-MON-yyyy'))
    TABLESPACE tsb
    , PARTITION sales_q3_2006 VALUES LESS THAN (TO_DATE('01-OCT-2006','dd-MON-yyyy'))
    TABLESPACE tsc
    , PARTITION sales_q4_2006 VALUES LESS THAN (TO_DATE('01-JAN-2007','dd-MON-yyyy'))
    TABLESPACE tsd
    )
    ENABLE ROW MOVEMENT;

    N ° you must create indexes for yourself.

  • Update of the partition key + compression on disk space

    Hello

    We have a table of partitoned.

    With the help of 11.2.0.3

    We need to update the partition key column because it has the wrong values.

    I take it's all done it automatically - if we upadte the column, the data is moved into the appropriate automatically partitions.

    Is this the case?

    Also, m we want to create a tab that is compressed; the short title of disc spae.

    How small is a pill against the table uncompressed on average?

    Thank you

    We have just in the research to update the small portion of these data.

    Question if it's a small or large portion of data, you have no need to allow the movement of the line.
    Yes, it takes a quick operation.

    Compression data warehouse - no OLTP.

    Outside the Exadata, there are two compression options for table - "fundamental" or "oltp.
    http://allthingsoracle.com/compression-Oracle-basic-table-compression/

  • I get corrupted files indexing whenever I have access directly to the files on my system.

    I installed Windows 7 on a partition of a raid 0 with Windows XP on a second partition as a dual boot. The installer went well and all the drivers seem to work well. It seems anytime access to files via windows Explorer, my computer, etc., the indexing of files get corrupted. The system detects corruption and upon reboot it travels the disk repair utilities and deletes several files indexing, that it says are corrupt and the cycle goes round. I disabled the indexing on all partitions file and the problem got better but I still occasionally run the disc scan and correct indexing errors more. Everyone knows about this problem?

    Hi clonemark,

    Thanks for the reply on the community forum.

    Have you run any disk hard diagnosis tools that your hardware vendor can provide?  Initially, it sounds like there may be some bad sectors on the disks themselves hard.  If your system is under warranty, you may contact your provider and walk through a test of health with them.  If this is not the case, they have a tool on the site to help you with this.

    Don't forget a RAID 0 provides no redundancy so if any disk fails, without a State of full system / or all of the files you want to back up you are in danger of losing everything.  I want to make sure it is before much more is done, please make a good backup of all the data that you consider to be important for you on this system.

    In addition, if the material is not corrupted.  Check if the table that you created is corrupt.  Errors that you are declaring seem to indicate somewhere in this - table of data or hardware is damaged.  If chkdsk runs and can't find any error then it would be not significant to this procedure, but chkdsk running and to find errors, this is what is worrying.

    After checking if the material and the table are healthy, start in a clean boot state.

    Step 1: Perform a clean boot - this comes from an article in Windows Vista, however, the procedure is the same.  Don't forget to follow step 7 of this article, after the troubleshooting steps are made - http://support.microsoft.com/kb/929135 Note if the computer is connected to a network, the network may be policy settings prevent you from following these steps. We recommend strongly that you do not use System Configuration utility to change startup options on the computer, unless a support engineer Microsoft directs you to do so. This can make the computer unusable.

    1. Log the computer by using an account with administrator rights.
    2. Click Start

      , type msconfig.exe in the box start looking for and then press ENTER to start the System Configuration utility.

    If you are prompted for an administrator password or for confirmation, type your password or click on continue.

  • On the general tab of the , click on selective startup of , and then click to clear the load startup items check box. (The box use the file Boot isn't available.)
  • Under the Services tab, select the hide all Microsoft services checkbox and then click disable all.

    Note Following this step lets services Microsoft continue to run. These services include networking, Plug-and-Play, record of events, error reporting, and other services. If you disable these services, you can permanently delete all restore points. Do not do this if you want to use to restore the system with the existing restore points.

  • -Click OK and then click Restart.
  • After you restart your computer follow these Rummy to run chkdsk.  This should stop the procedure was running and bringing only to run in your previous post.  Run chkdsk until more no error is detected.  Then the run once more to verify it shows always 0 errors.

    If you still experience the problem, and all the steps listed above have been verified, run a tool to remove malware and VIRUS SCAN on all partitions in your operating system.  Check that there is no software of thugs on the system.

    Let us know on this question of how things progress.

    Kind regards

    Debbie
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • "ERROR: access denied"on the partition does not work no security and takeown tab.

    Hi assistants.

    It is my last resource to solve my problem, hope that someone can understand. Any help is appreciated.

    I'm unable to takeown to my hard drive using one of the following:

    • Run cmd as admin takeown /f l:
    • Log in as administrator, cmd, takeown /f l:
    • Takeown /f l,: run takeown in Safe Mode (with command line),
    It always returns "ERROR: access denied."

    In the beginning, I have removed all the user/group permissions via right click-> properties-> Security-> edit and he urged something on the legacy, so I followed this and removed everything. (Little I didn't know that it can't be undone...)

    Now when I right click on the drive and make appear the properties, there is no security tab and left click says access denied.

    Sorry, I'm just ideas. Here are the options I have for you:
    (a) see if you can do something when the machine with your repair CD Windows 7 starts in a Repair Mode command prompt.
    (b) save the file elsewhere, and then format the partition.
    (c) let me take a look at your machine (because it is four eyes see more than two).

    If you want to learn more about option c), send a note to pegasus_fnlATyahooDOtcom.

  • What Oracle Table contains the name of the Partition key field?

    What Oracle table/view retains the name of partition key field?

    All_Tab_Partitions does not seem to keep this information.

    When I use the toad-> pattern-> Tables-> Partitions, it lists the name of the key field of partition, that partition is based.

    Thank you

    all_part_key_columns
    or
    USER_part_key_columns

    Published by: OrionNet on December 5, 2008 15:56

  • Index bitmap for FKs on fact tables

    Hi all

    We have a database of DWH (Star Dimesions and the tables schema) running with OBIEE 11 g (11.1.1.1.6) on the oracle 11 g (11.2.0.1) database. I read in one of the best practical paper, creating index Bitmap on the Fks of all fact tables will help performance.

    I created indexes for the less than 2500 separate keys, but we have 2 dimesions tables where there are great number of records (size 14 g and 10 g). Can I go ahead and create indexes of bitmap for 2 tables establishments (mainly account_key and customer_keys are the columns)?

    Worried about creating index bitmap for large tables where they could affect the ETL process.

    Ref: http://www.oracle.com/technetwork/database/bi-datawarehousing/twp-dw-best-practies-11g11-2008-09-132076.pdf (page 20)

    Help, please.

    Thank you and best regards,
    Anand.

    >
    I created indexes for the less than 2500 separate keys, but we have 2 dimesions tables where there are great number of records (size 14 g and 10 g). Can I go ahead and create indexes of bitmap for 2 tables as well
    . . .
    Worried about creating index bitmap for large tables where they could affect the ETL process.
    >
    You put the cart before the horse!

    Don't create index unless you have a reason documented for them.

    Why did you choose the index bitmap for cardinality less than 2500? Perhaps based on a long-standing myth, but discredited on the cardinality?

    See also Richard Foote two articles where he explodes the myths about bitmap indexes and considerations of cardinality
    http://richardfoote.WordPress.com/2010/02/18/myth-bitmap-indexes-with-high-distinct-columns-blow-out/
    http://richardfoote.WordPress.com/2010/03/03/1196/

    Re your concern about the tables with the 'large' number of records and affecting ETL.

    You are right to be concerned about these issues, but you need to document your particular situation taking into account the architecture.

    The fact tables and dimension tables can have a large number of records. If using the bitmap index is indicated, then the most records are most effective, they will be.

    ETL is affected because the DML (INSERT, UPDATE, DELETE) operations on the tables with bitmap indexes can have serious performance because of the involved serialization issues. Updated single bitmap of a column value (e.g., am ' to 'F' gender) requires that the two index bitmap blocks must be blocked until the update is complete. An index of stored bitmap ranges ROWID (rowid min - max rowid) that can span many, many files. The "range" of ROWID is locked in order to change a value.

    To change: 'follow her' rowid beach so that a row is locked and ID should be removed from the range by turning off the bit. Change to the 'F', the rowid id range 'F' must be found, locked and the bit set that corresponds to this rowid. No another row with ROWID in the range cannot be changed, because it is a transaction in the series. If the range includes 1000 lines and they all need changed it takes 1000 series.

    For anything other that a very small number of documents the bitmap index would be deleted and rebuilt after the ETL operations. That is why the data warehouse designs try to minimize update and implement insertions and deletions using partitioning when possible; Adding a new day by adding a new partition.

    There is also a big difference between a bitmap index and a bitmap join index. The white paper you quoted does not really indicate what type are used or recommended.

    Learn more about the difference - see Using Bitmap indexes in data warehouses in the doc of Data Warehousing
    http://docs.Oracle.com/CD/B28359_01/server.111/b28313/indexes.htm

  • struggling to get online, says limited access and check the network security key

    Im trying to connect to my neighbors router and he repeats to me limited access and verify the security key network, what do I do I have the password of the router but it won't let me connect and I have a great connection with him help pleas

    Hello

    I suggest you to refer to this link and check if it helps:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-networking/limited-access-in-WiFi-though-correct-network-key/e08df2dd-500F-470D-ba60-63b25e726408

    It will be useful.

  • What happens to the existing after the partition of table index and created with local index

    Hi guys,.

    / / DESC part id name number, varchar2 (100), number of wage

    In an existing table PART I add 1 column DATASEQ MORE. I wonder the part of table based on dataseq.now, the table is created with this logic of partition

    create the part table partition (identification number, name varchar2 (100), number of salary, number DATASEQ) in list (dataseq) (values partition PART_INITIAL (1));

    Suggestionn necessary. given that the table is partitioned based on DATASEQ I wonder to add local indexes on dataseq. to dataseq, I have added a local index create index idx on share (dataseq) LOCAL; Now my question is, already, there are the existing index is the column ID and salary.

    (1) IDX for dataseq is created locally so that it will be partition on each partition on the main table. Please tell me what is happening to the index on the column ID and salary... it will create again in local?

    Please suggest

    S

    Hello

    first of all, in reality 'a partition table' means create a new table a migration of existing data it (although, theoretically, you can use dbms_redefinition to partition an existing table - however, it's just doing the same thing behind the scenes). This means that you also get to decide what to do with the index - index will be local, who will be global (you can also reassess some of existing indexes and decide that they are not really necessary).

    Second of all, the choice of the partitioning key seems weird. Partitioning is a data management technique more that anything else, in order to be eligible, you must find a good partitioning key. A column recently added, named "data_seq" is not a good candidate. Can you give us more details about this column and why it was chosen as a partitioning key?

    I suspect that the person who proposed this partitioning scheme made a huge mistake. A non-partitioned table is much better in all aspects (including the ease of management and performance) that divided one wrongly.

    Best regards

    Nikolai

  • T440s: Where can I find the product key for Win7

    Where can I find the product key for Win7 on a T440s? There is no sticker on the bottom, or under the battery.

    Hi pjc123,

    In addition to the information above, I think the running Belarc Advisor will show you the product key.

    http://www.Belarc.com/free_download.html

  • Partition key would exist in local index, if so it should be first or last or is not serious?

    Hello

    I'm trying to find the rule for:

    -J' have a partitioned table every day and each partition has about 10 GB.

    -J' need to keep the data in 3 months.

    -I need to partition cutting happens.

    I'm trying to find if I need to use the local index the partition key or not.

    I am currently adding as the first column of the index.

    In my research on the web and with colleagues, I find three different answers:

    -It is not required to add local index the partition key.

    -It is compulsory and must be the first position.
    -It is necessary and should be the last position.

    I share below the criation of table as an example:

    CREATE TABLE MY_BIG_TABLE
    (
      MY_SOURCE             VARCHAR2(50 CHAR)       NOT NULL,
      MY_FILENAME           VARCHAR2(255 CHAR)      NOT NULL,
      MY_DATE               DATE                    NOT NULL,
      MY_ID                 VARCHAR2(50 CHAR)       NOT NULL,
      MY_ORIG_GROUP         VARCHAR2(50 CHAR)       NOT NULL,
      MY_DEST_GROUP         VARCHAR2(50 CHAR)       NOT NULL,
      MY_DURATION           NUMBER,
      MY_NR_EVENT           NUMBER
    )
    TABLESPACE MY_BIG_TABLESPACE_1
    PARTITION BY RANGE (MY_DATE)
    INTERVAL (NUMTODSINTERVAL(1,'DAY'))
    (  
      PARTITION P_FIRST VALUES LESS THAN (TO_DATE(' 2014-01-01 00:00:00', 'SYYYY-MM-DD HH24:MI:SS', 'NLS_CALENDAR=GREGORIAN'))
        LOGGING
        NOCOMPRESS 
        TABLESPACE MY_BIG_TABLESPACE_1
    )
    LOGGING 
    NOCOMPRESS 
    NOCACHE
    NOPARALLEL
    MONITORING
    /
    CREATE UNIQUE INDEX I_MY_BIG_TABLE
     ON MY_BIG_TABLE (
       MY_DATE,           
       MY_SOURCE,    
       MY_FILENAME,       
       MY_ID,             
       MY_ORIG_GROUP,     
       MY_DEST_GROUP     
     )
     TABLESPACE MY_BIG_IDX_TABLESPACE_1
     LOGGING
     NOCOMPRESS
     NOPARALLEL
     LOCAL
    /
    

    Best regards

    Ricardo Tomas

    Well, I don't like this example because I would tell you to use on your text string to_date and to_char on your column.

    Let's say if you have a partition of the range with a value of one month of data in the partition and you want to select the data for a given day. Oracle must be able plum of the score, but then you have to complete the partition scanning unless there was an index containing the day (assuming it's the partition key)

  • Unique key on the partitioned table range

    Hello

    We use a range of composite range-hash partitioned table

    Use index - try to do this have same tablespace to the local partitions but not liking it

    ALTER table RETAILER_TRANSACTION_COMP_POR
    Add primary key constraint RETAILER_TRANSACTION_COMP_PK (DWH_NUM)
    using index
    LOCAL


    ORA-14039: partitioning columns must be a subset of the columns in a unique index key

    Without local then fine but does not have same tablespace to walls and don't want to make this part of the partition key.

    Range Tbal partitioned - it's just a UK to avoid duplicates
    [oracle@localhost ~]$ oerr ora 14039
    14039, 00000, "partitioning columns must form a subset of key columns of a UNIQUE index"
    // *Cause:  User attempted to create a UNIQUE partitioned index whose
    //          partitioning columns do not form a subset of its key columns
    //          which is illegal
    // *Action: If the user, indeed, desired to create an index whose
    //          partitioning columns do not form a subset of its key columns,
    //          it must be created as non-UNIQUE; otherwise, correct the
    //          list of key and/or partitioning columns to ensure that the index'
    //          partitioning columns form a subset of its key columns
    
  • size of the partition

    Hi all

    I am sharing my table on a date column that has no indexes created on this subject.

    the partition size should need to index on the partition key to work?

    or it will work even with the index?

    concerning

    REDA

    Hello

    It's one of the reasons why we use the partition.
    You don't need indexes on the date column to split prutining. Partition key in where clause is sufficient.

    Concerning
    Anurag Tibrewal

  • access SQL vs tuning question Advisor

    I am trying to understand a question which is:

    Which of the following identifies and creates an index to reduce the time of the DB for a given SQL statement?

    (a) SQL Tuning Advisor
    (b) SQL Access Advisor

    I think the right answer is a) tuning advisor, because it is for a given SQL statement and it can also be configured to automatically create an index when it runs over the extensible standard maintenance task. However, the marked answer is b) Access Advisor. That which is correct and why?

    Thank you!

    Waldrfm,

    I guess this question of OCP is also asking if STA or SAA make recommendations in terms of DB Time (%) or the cost of the workload (%).

    When you look at the details of STA recommendation, it is show recommendations by times of DB (which includes the DB service time + queue DB time) *, in particular for each SQL statement.

    However, when you look at the details of recommendation of SAA, is show the recommendations by improving Total cost (which is the cost of CBO, SUM (IO + CPU)). * instead of DB self time

    SQL statement.

    For example,.

    When you tune in 10 identified SQL statements using the STA, it tunes indivdual SQL statement acting time of each SQL DB.

    SAA tunes instructions SQL 10 identified as a workload making recommendations based on improving Total cost of the entire workload.

  • Performance problem on the SQL query that does not use the primary key index

    Hello!

    I have some performance issues on a single SQL query (Oracle 10 g).
    I could solve the problem by using the INDEX indicator, but I would like to know WHY this is happening.

    * Tables *.
    create table jobs)
    ID number (5) not null,
    name varchar2 (100),
    primary key constraint Job_PK (id)
    )
    /
    -Record count: 298

    create table Comp)
    integer ID not null,
    name varchar2 (100),
    primary key constraint Comp_PK (id)
    )
    /
    -Record count: 193

    -Relation m: n
    create table JobComp)
    integer ID not null,
    id_job integer not null,
    id_comp integer not null,
    primary key constraint JobComp_PK (id),
    unique key constraint JobComp_UK (id_job, id_comp),
    Constraint JobComp_FK_Job foreign key (id_job) refers to Job (id),
    Constraint JobComp_FK_Comp foreign key (id_comp) makes reference Comp (id)
    )
    /
    create index JobComp_IX_Comp on JobComp (Cod_Comp)
    /
    create index JobComp_IX_Job on JobComp (Cod_Job)
    /
    -Record count: 6431

    * Ask *.

    When I run this query, the execution plan shows the index using (JobComp_PK and JobComp_IX_Comp).
    No problem.

    Select JobComp.*
    of JobComp
    Join jobs
    on Job.id = JobComp.id_job
    where JobComp.id_comp = 134
    /
    -runs in 0.20 sec

    But when I add the field 'name' of the work table the plan uses full access table to the table of work

    Select JobComp.*, Job.name
    of JobComp
    Join jobs
    on Job.id = JobComp.id_job
    where JobComp.id_comp = 134
    /
    -runs in the 2.70 dry

    With the help of the index

    Select / * + INDEX (Job Job_PK) * /.
    JobComp.*, Job.name
    of JobComp
    Join jobs
    on Job.id = JobComp.id_job
    where JobComp.id_comp = 134
    /
    -runs in 0.20 sec

    * Doubt *.

    This behavior is correct?

    PS. : I tried to recalculate the statistics, but nothing changes:

    analyze the job calculation table statistics.
    /
    change the statistical calculation of index Job_PK reconstruction;
    /
    Start
    dbms_utility.analyze_schema (sys_context ('userenv', 'current_schema'), 'CALCULATE');
    end;
    /

    [of]
    Gustavo Ehrhardt

    Gus.EHR wrote:
    Hello.
    I'm sorry for the plan unformatted.
    The execution time of the querys "without field name' and 'with the field name with suspicion" are equal.
    He has no problem caching, because I get the plans of the sequence different from the querys and repeated the performance. The result is always the same.

    I don't think that there is no problem with oracle crossing LOOP IMBRIQUEE to the HASH JOIN when you include the field name and this should be the expected behavior. But it seems that your WORKING table has a degree of parallelism set against what is causing the query to run in parallel (as JOB table is now available with full table scan, instead of indexed access earlier). It could be that the parallel execution is contributor to extra Runtime.
    (a) do you know why the degree of parallelism on the WORK table has been defined? Do you need it?

    You can see if the following query provides a better response time?

    select /*+ NOPARALLEL(JOB) */ JobComp.*, Job.Name
      from JobComp
      join Job
        on Job.id = JobComp.id_job
     where JobComp.id_comp = 134
    

Maybe you are looking for