How to judge index health

Hi
i just want to know how to judge index is healthy
i know i should look at
BLEVEL , LEAF_BLOCKS , DISTINCT_KEYS , CLUSTERING_FACTOR
in dba_indexes
but how to calculate from this value the health of an index
I know that BLEVEL should be 3 or less , any other rules?
Thanks very much

Thanks for all replies , BLEVEL is 4 or more means u need to rebuild ur index.
After reading , i am including example of more jnior dbas to help them understand , wen i can say that clustering factor is good or bad for an index
Ex:
suppose i have T1 table , and i have Id.T1 indexed with index called IDX1 ,
IF
select blocks from dba_tables where table_name ='T1';
= or close to
select clustering_factor from dba_indexes where index_name = 'IDX1';
then the clustering factor is very good. because that means each visit to 1 index block
will nearly fetch 1 data block from the table (data in the table is not randomly inserted accoring to the indexed column(ID))
but if the select clustering_factor from dba_indexes where index_name = 'IDX1';
is much higher than the blocks of the table and nearly = to the number of index entries (or the count(distinct values to the indxed column) (ID) )
then the clustering factor is very bad and the CBo may prefer to Full table scan rather than access the table by index

Similar Messages

  • How to specify index for cache in coherence-cache-config.xml

    Hi All,
    We want to apply indexing on cache data.
    Suppose i have a EMPLOYEE object in coherence cache.
    and i want to use employeeID for indexing purpose.
    Can anybody help me to achieve this at Congregational level i.e. using xml file (coherence-cache-config.xml) .
    Edited by: 981644 on Jan 16, 2013 1:51 AM

    Hi,
    I've posted some [url http://coherence.oracle.com/download/attachments/14647422/add-index-namespace.jar]code and the [url http://coherence.oracle.com/download/attachments/14647422/add-index-namespace-src.jar]source. It depends on coherence common version 2.3.0.39174 however I believe it will work with 2.0.0.23649 also. Coherence common library can be downloaded from [url http://coherence.oracle.com/display/INC10/coherence-common]here
    Note: This is purely an example on how to achieve index creation via a cache configuration file and is not a part of the product thus is not covered by product support.
    Here is an example cache configuration that uses the namespace:
    <cache-config xmlns:service="class://com.oracle.coherence.environment.extensible.ServiceOperations">
        <caching-scheme-mapping>
            <service:index-add cache-name="dist-indexes">
                <extractor>
                    <class-name>ReflectionExtractor</class-name>
                    <init-params>
                        <init-param>
                            <param-type>string</param-type>
                            <param-value>getName</param-value>
                        </init-param>
                    </init-params>
                </extractor>
            </service:index-add>
            <!-- Simplified POF Config -->
            <service:index-add cache-name="dist-indexes" pof-enabled="true">
                <pof-index>8,16,32</pof-index>
            </service:index-add>
            <!-- This should not be counted based on system-property override -->
            <service:index-add cache-name="dist-indexes" pof-enabled="true" enabled="{tangosol.index.add}">
                <pof-index>8,16,31</pof-index>
            </service:index-add>
            <!-- Explicit POF Config -->
            <service:index-add cache-name="dist-indexes">
                <extractor>
                    <class-name>PofExtractor</class-name>
                    <init-params>
                        <init-param>
                            <param-type>{class}</param-type>
                            <param-value>null</param-value>
                        </init-param>
                        <init-param>
                            <param-type>{object}</param-type>
                            <param-value>
                                <class-name>com.tangosol.io.pof.reflect.SimplePofPath</class-name>
                                <init-params>
                                    <init-param>
                                        <param-type>{int[]}</param-type>
                                        <param-value>1,2,4</param-value>
                                    </init-param>
                                </init-params>                     
                            </param-value>
                        </init-param>
                    </init-params>
                </extractor>
            </service:index-add>
        </caching-scheme-mapping>
    </cache-config>Thanks,
    Harvey

  • How to enforce index in oracle query

    Hi all
    how to enforce index in oracle query
    Regards

    Use INDEX hint to force Optimizer to use the specfied index.
    You really need to investigate why Optimizer doesn't choose the index. Remember, INDEX SCAN are not always GOOD.
    Jaffar

  • How to view Index fragmentation in sap ecc6 ?

    how to view Index fragmentation in sap ecc6 ?

    Hi Haimiao,
    You can use brtools to get required information. For relevant steps use the link below
    https://help.sap.com/saphelp_nw04/helpdata/en/08/5742154ae611d1894f0000e829fbbd/content.htm
    Regards,
    Deepak Kori

  • How to judge the size of a playlist to burn to disc?

    does anyone know how to judge the size of a playlist to burn to disc?

    Click View>Show Status Bar
    Select the tracks you want to burn.
    The Status Bar will show you the info for the selected tracks, so you know if it'll fit or not.
    Clicking the info in the Status Bar will "toggle" between general and detailed view.

  • How to get the health , performance information and about the services run on devices that have connected to the system center?

    Hi All,
    I want to know how to get the health , performance information and about the services run on devices that have connected to the system center to my c# application. Also I need to know about the information of databases that have connected to system center.
    I will appreciate your feedback
    Thank you

    Hi,
    You can configure service monitor for the required service on the server
    refer below link for how to configure service monitoring
    http://www.bictt.com/blogs/bictt.php/2011/03/17/scom-monitoring-a-service-part3
    You can use SCOM SDK to connect to the scom server using c# and get required information
    http://msdn.microsoft.com/en-us/library/hh329086.aspx
    you can find the database in below registry path on management server
    HKLM:\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Setup\DatabaseName
    Regards
    sridhar v

  • How to stop indexing certain set of documents in Fast search for sharepoint 2010

    Hello
    Can someone help me to understand how to drop documents with the state as archived at the time of indexing, i meant how to stop indexing those documents in fast search for sharepoint 2010.
    Shweta
    Me

    Have you tried adding it to the exclude list?
    Include a file type in the content index (FAST Search
    Server 2010 for SharePoint)
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • How to judge inspection lot is LTCA status?

    Hi all, How to judge inspection lot is LTCA status? Can we see it in QALS table? But which field is for this status? Many thanks!

    I'm hitchhiking on this thread.
    I need to know not only that the inspection lot is cancelled (I get this on JEST table), but also when it was cancelled. For ex. on monday night I loaded from QM to BW an inspection lot that was registered during the day. This lot was cancelled for ex. on thursday. At the night load I have to identify it and load the lot to BW, to maintain is as cancelled also in BW.
    What I discovered until now:
    - The OBJNR on QALS is the constant "QL" plus the lot number (prueflos).
    - On JEST table I have all my lots (from QALS), with the correct status. The cancelled lots have STAT = I0224. But the table doesn't have the cancelling date.
    - JCDS table seems to be a good chance, it has status and date fields. But my lots (from QALS) are not there. And, curious, I didn't find any I0224 status.
    Everything on the project is OK, this is the only unsolved question, so I'll appreciate any quick answer.
    César

  • How to judge the mouse enter which one of buttons?

    There two buttons(no text,only icon on them),
    and how to judge the mouse enter which one of
    them and show the different message at one textfield?

    Try this. I don't know if the code works, but the true solution will be like it.
    void mouseClicked(MouseEvent e)
        int mask = e.getModifiers();
        if((mask & InputEvent.BUTTON1_MASK) != 0)
            System.out.println("You touched to the button 1!");
        else if((mask & InputEvent.BUTTON2_MASK) != 0)
            System.out.println("You touched to the button 2!");
        else if((mask & InputEvent.BUTTON3_MASK) != 0)
            System.out.println("You touched to the button 3.");
    }Ghys

  • What is partition ? how to create partition ? how to maintain indexes ?

    HI experts,
    What is the  use of peartion table
    how to create partition ?
    how to create index ? how to maintain ?
    Thanks in Advance!
    Vijay

    Read
    Partitioned Tables and Indexes
    Create Partitioned Tables and Indexes
    SQL Server Index and Statistics Maintenance
    Many Thanks & Best Regards, Hua Min

  • How to utilize index in selection statement

    hi
    how to utilize index in selection statement and how is it reduces performance whether another alternative is there to reduce performance .
    thanks

    Hi Suresh,
    For each SQL statement, the database optimizer determines the strategy for accessing data records. Access can be with database indexes (index access), or without database indexes (full table scan).The cost-based database optimizer determines the access strategy on the basis of:
    *Conditions in the WHERE clause of the SQL statement
    *Database indexes of the table(s) affected
    *Selectivity of the table fields contained in the database indexes
    *Size of the table(s) affected
    *The table and index statistics supply information about the selectivity of table fields, the selectivity of combinations of table fields, and table size.     Before a database access is performed, the database optimizer cannot calculate the exact cost of a database access. It uses the information described above to estimate the cost of the database access.The optimization calculation is the amount by which the data blocks to be read (logical read accesses) can be reduced. Data blocks show the level of detail in which data is written to the hard disk or read from the hard disk.
    <b>Inroduction to Database Indexes</b>
    When you create a database table in the ABAP Dictionary, you must specify the combination of fields that enable an entry within the table to be clearly identified. Position these fields at the top of the table field list, and define them as key fields.
    After activating the table, an index is created (for Oracle, Informix, DB2) that consists of all key fields. This index is called a primary index. The primary index is unique by definition. As well as the primary index, you can define one or more secondary indexes for a table in the ABAP Dictionary, and create them on the database. Secondary indexes can be unique or non-unique. Index records and table records are organized in data blocks.
    If you dispatch an SQL statement from an ABAP program to the database, the program searches for the data records requested either in the database table itself (full table scan) or by using an index (index unique scan or index range scan). If all fields requested are found in the index using an index scan, the table records do not need to be accessed.
    A data block shows the level of detail in which data is written to the hard disk or read from the hard disk. Data blocks may contain multiple data records, but a single data record may be spread across several data blocks.
    Data blocks can be index blocks or table blocks. The database organizes the index blocks in the form of a multi-level B* tree. There is a single index block at root level, which contains pointers to the index blocks at branch level. The branch blocks contain either some of the index fields and pointers to index blocks at leaf level, or all index fields and a pointer to the table records organized in table blocks. The index blocks at leaf level contain all index fields and pointers to the table records from the table blocks.
    The pointer that identifies one or more table records has a specific name. It is called, for example, ROWID for Oracle databases. The ROWID consists of the number of the database file, the number of the table block, and the row number within the table block.
    The index records are stored in the index tree and sorted according to index field. This enables accelerated access using the index. The table records in the table blocks are not sorted.
    An index should not consist of too many fields. Having a few very selective fields increases the chance of reusability, and reduces the chance of the database optimizer selecting an unsuitable access path.
    <b>Index Unique Scan</b>
    If, for all fields in a unique index (primary index or unique secondary index), WHERE conditions are specified with '=' in the WHERE clause, the database optimizer selects the access strategy index unique scan.
    For the index unique scan access strategy, the database usually needs to read a maximum of four data blocks (three index blocks and one table block) to access the table record.
    <b><i>select * from VVBAK here vbeln = '00123' ......end select.</i></b>
    In the SELECT statement shown above, the table VVBAK is accessed. The fields MANDT and VBELN form the primary key, and are specified with '=' in the WHERE clause. The database optimizer therefore selects the index unique scan access strategy, and only needs to read four data blocks to find the table record requested.
    <b>Index Range Scan</b>
    <b><i>select * from VVBAP here vbeln = '00123' ......end select.</i></b>
    In the example above, not all fields in the primary index of the table VVBAP (key fields MANDT, VBELN, POSNR) are specified with '=' in the WHERE clause. The database optimizer checks a range of index records and deduces the table records from these index records. This access strategy is called an index range scan.
    To execute the SQL statement, the DBMS first reads a root block (1) and a branch block (2). The branch block contains pointers to two leaf blocks (3 and 4). In order to find the index records that fulfill the criteria in the WHERE clause of the SQL statement, the DBMS searches through these leaf blocks sequentially. The index records found point to the table records within the table blocks (5 and 6).
    If index records from different index blocks point to the same table block, this table block must be read more than once. In the example above, an index record from index block 3 and an index record from index block 4 point to table records in table block 5. This table block must therefore be read twice. In total, seven data blocks (four index blocks and three table blocks) are read.
    The index search string is determined by the concatenation of the WHERE conditions for the fields contained in the index. To ensure that as few index blocks as possible are checked, the index search string should be specified starting from the left, without placeholders ('_' or %). Because the index is stored and sorted according to the index fields, a connected range of index records can be checked, and fewer index blocks need to be read.
    All index blocks and table blocks read during an index range scan are stored in the data buffer at the top of a LRU (least recently used) list. This can lead to many other data blocks being forced out of the data buffer. Consequently, more physical read accesses become necessary when other SQL statements are executed
    <b>DB Indexex :Concatenation</b>
         In the concatenation access strategy, one index is reused. Therefore, various index search strings also exist. An index unique scan or an index range scan can be performed for the various index search strings. Duplicate entries in the results set are filtered out when the search results are concatenated.
    <i><b>Select * from vvbap where vbeln in ('00123', '00133', '00134').
    endselect.</b></i>
    In the SQL statement above, a WHERE condition with an IN operation is specified over field VBELN. The fields MANDT and VBELN are shown on the left of the primary index. Various index search strings are created, and an index range scan is performed over the primary index for each index search string. Finally, the result is concatenated.
    <b>Full Table Scan</b>
    <b><i>select * from vvbap where matnr = '00015'.
    endselect</i></b>
    If the database optimizer selects the full table scan access strategy, the table is read sequentially. Index blocks do not need to be read.
    For a full table scan, the read table blocks are added to the end of an LRU list. Therefore, no data blocks are forced out of the data buffer. As a result, in order to process a full table scan, comparatively little memory space is required within the data buffer.
    The full table scan access strategy is very effective if a large part of a table (for example, 5% of all table records) needs to be read. In the example above, a full table scan is more efficient than access using the primary index.
    <i><b>In Brief</b></i>
    <i>Index unique scan:</i> The index selected is unique (primary index or unique secondary index) and fully specified. One or no table record is returned. This type of access is very effective, because a maximum of four data blocks needs to be read.
    <i>Index range scan:</i> The index selected is unique or non-unique. For a non-unique index, this means that not all index fields are specified in the WHERE clause. A range of the index is read and checked. An index range scan may not be as effective as a full table scan. The table records returned can range from none to all.
    <i>Full table scan:</i> The whole table is read sequentially. Each table block is read once. Since no index is used, no index blocks are read. The table records returned can range from none to all.
    <i>Concatenation:</i> An index is used more than once. Various areas of the index are read and checked. To ensure that the application receives each table record only once, the search results are concatenated to eliminate duplicate entries. The table records returned can range from none to all.
    Regards,
    Balaji Reddy G
    ***Rewards if answers are helpful

  • How to reorganization index in new tablespace

    How to reorganization index in new tablespace? for size? for? number of extents? or both?

    What's Oracle version?
    Why you want to reorg your index?
    You could rebuild your index
    alter index <index_name> rebuild tablespace <tablespace_name>check Jonathan's note regarding index rebuild,
    http://jonathanlewis.wordpress.com/2008/02/09/index-rebuild-10g/

  • How to enforce index

    Hi Guys,
    How to enforce index ?
    Say for example,
    select max(dt) from emp
    emp table has an index called 'id1'.
    I want to enforce this index for the above query. How ?
    Inputs are welcome !

    Your index on ID is worthless for this query.
    You would have to add an index on your DT column. Even then, the index will only be used if you have a NOT NULL constraint on the column (or add "and dt is not null" to your query):
    SQL> explain plan for
      2  select min(dt), max(dt) from emp;
    Explained.
    | Id  | Operation            |  Name       | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT     |             |     1 |     8 |   194 |
    |   1 |  SORT AGGREGATE      |             |     1 |     8 |       |
    |   2 |   TABLE ACCESS FULL  | EMP         | 91000 |   710K|   194 |
    SQL> alter table emp modify (dt not null);
    Table altered.
    SQL> explain plan for
      2  select min(dt), max(dt) from emp;
    Explained.
    | Id  | Operation             |  Name       | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT      |             |     1 |     8 |    39 |
    |   1 |  SORT AGGREGATE       |             |     1 |     8 |       |
    |   2 |   INDEX FAST FULL SCAN| EMP_DT      | 91000 |   710K|    39 |
    ---------------------------------------------------------------------Still, even without an index a full table scan of 91000 rows takes < 1 second even on my laptop. How are you getting 21 seconds?

  • How to create indexes on ODS ?

    Hello friends ,
    Need some help .
    Could any one please let me know how to create indexes on ODS ?
    How Indexes are useful on ODS ?
    Thanks in advance
    Regards

    Dear Akshay,
    Below is the information about indexes and there creation for ODS.
    You can search a table for data records that satisfy certain search criteria faster using an index.
    An index can be considered a copy of a database table that has been reduced to certain fields. This copy is always in sorted form. Sorting provides faster access to the data records of the table, for example using a binary search. The index also contains a pointer to the corresponding record of the actual table so that the fields not contained in the index can also be read.
    The primary index is distinguished from the secondary indexes of a table. The primary index contains the key fields of the table and a pointer to the non-key fields of the table. The primary index is created automatically when the table is created in the database.
    You can also create further indexes on a table in the ABAP Dictionary. These are called secondary indexes.Under Indexes, you can create secondary indexes by using the context menu in order to improve the load and query performance of the ODS object This is necessary if the table is frequently accessed in a way that does not take advantage of the sorting of the primary index for the access.
    The database system sometimes does not use a suitable index for a selection, even if there is one. The index used depends on the optimizer used for the database system. You should therefore check if the index you created is also used for the selection (see How to Check if an Index is Used).).
    Creating an additional index could also have side effects on the performance. This is because an index that was used successfully for selection might not be used any longer by the optimizer if the optimizer estimates (sometimes incorrectly) that the newly created index is more selective.
    The indexes on a table should therefore be as disjunct as possible, that is they should contain as few fields in common as possible. If two indexes on a table have a large number of common fields, this could make it more difficult for the optimizer to choose the most selective index.
    Leaving content frame.
    With Regards,
    Prafulla Singh

  • How to create indexes using CREATE TABLE statement

    Hi,
    Can anyone please tell me how to create indexes using CREATE TABLE staement? This point is part SQL Expert exam (1Z0-047) and please guide me to use which books for this particular exam.
    Thanks in advance.

    Can anyone please tell me how to create indexes using CREATE TABLE staement?e.g. creating a primary key or a unique constraint will generate indexes along with the create table syntax:
    SQL> create table t (a integer primary key, b integer unique)
    Table created.
    SQL> select   index_name, index_type, uniqueness
      from   user_indexes
    where   table_name = 'T'
    INDEX_NAME                     INDEX_TYPE                  UNIQUENES
    SYS_C0016575                   NORMAL                      UNIQUE  
    SYS_C0016574                   NORMAL                      UNIQUE  
    2 rows selected.

Maybe you are looking for

  • Multiple iPods on 1 computer...

    i recently bought an iPod Nano....my cousin has the songs that i want on his computer....am i able to download those songs onto my iPod from his computer? please email me at [email protected] thanks very much....

  • Condition value of Tax gets wrongly added to Total value of Contract

    Hi All, I'm currently investigating an issue where there are 2 line items in an SAP Sales Contract. There is a human error in the second line where the billing end date is less than billing start date in the billing plan. Consequently, the second lin

  • Run Oracle VM Manager in VMware VM??

    Yes, I know it's sounds a little clugy but that is what my customer is asking. They do not want to provision another physical server simply to be the VM Manager. Is it supported to install the Oracle VM Manager inside of a VMware virtual machine?

  • Itune - movie download

    Two questions here 1. You know to import music file to itune, I can use "add file to library" or "import" function. But when I try to do the same for movie, it does not work now although it work initially. what happen? 2. for those movie file that I

  • How can I improve the response time of the user interface?

    I'm after some tips on how to improve the response time to mouse clicks on a VI front panel. I have  data acquistion application which used to run fine, but after spending a couple of weeks making a whole bunch of changes to it I find that the user i