Prefixed index vs. Non-prefixed Index.  Which is faster?

If you have a partitioned table, which type index (prefix or non-prefix) would benefit most performance wise?

ji**** wrote:
If you have a partitioned table, which type index (prefix or non-prefix) would benefit most performance wise?Gllobally partitioned indexes have to start with the partition key - otherwise choose the column order that allows the most important queries to operate most efficiently. The prefix/non-prefix concept for local indexes is a hangover from the earliest days of partitioning.
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
A general reminder about "Forum Etiquette / Reward Points": http://forums.oracle.com/forums/ann.jspa?annID=718
If you never mark your questions as answered people will eventually decide that it's not worth trying to answer you because they will never know whether or not their answer has been of any use, or whether you even bothered to read it.
It is also important to mark answers that you thought helpful - again it lets other people know that you appreciate their help, but it also acts as a pointer for other people when they are researching the same question, moreover it means that when you mark a bad or wrong answer as helpful someone may be prompted to tell you (and the rest of the forum) what's so bad or wrong about the answer you found helpful.

Similar Messages

  • Unique index vs non-unique index

    Hi Gurus,
    I'm getting lots of "TABLE ACCESS FULL" for lots of columns which have non-unique indexes is some queries. So my question is does optimizer does not pick up non-unique index but only pickes up unique indexes for those columns.
    Thanks
    Amitava.

    amitavachatterjee1975 wrote:
    Hi Gurus,
    I'm getting lots of "TABLE ACCESS FULL" for lots of columns which have non-unique indexes is some queries. So my question is does optimizer does not pick up non-unique index but only pickes up unique indexes for those columns.
    Thanks
    Amitava.WHY MY INDEX IS NOT BEING USED
    http://communities.bmc.com/communities/docs/DOC-10031
    http://searchoracle.techtarget.com/tip/Why-isn-t-my-index-getting-used
    http://www.orafaq.com/tuningguide/not%20using%20index.html

  • Space occupied by clustered index Vs non-clustered index

    I am trying to understand the indexes. Does clustered index occupy more space than a non-clustered index because it carries the information about rest of the other columns also. Could you guys please help me understand this. Thanks in advance.
    svk

    Hi czarvk,
    Clustered index in SQL Server takes up more space than non-clustered indexes.
    Clustered index arranges the way records are stored in a table putting them in order (key, value), all the data are sorted on the values of the index.
    A non-clustered index is a completely different object in a table, containing only a subset of columns and a row locator to the table’s rows or to the clustered index’s key.
    So clustered index in SQL Server takes up more space than non-clustered indexes.
    If you have any question, please feel free to let me know.
    Regards,
    Donghui Li

  • What is RID in non clustered index and its use

    Hi All,
    I need help regarding following articles on sql server
    1) what is RID in non clustered index and its use.
    2) What is Physical and virtual address space. Difference in 32 bit vs 64 bit Virtual address space
    Regards
    Rahul

    Next time Please ask single question in a thread you will get better response.
    1. RID is location of heap. When you create Non clustered index on heap and
    lookup happens to get extra records RID is used to locate the records. RID is basically Row ID. This is basic definition for you. Please read
    this Thread for more details
    2. I have not heard of Physical address space. I Know Virtual address space( VAS)
    VAS is simple terms is amount of memory( virtual )  'visible' to a process, a process can be SQL Server process or windows process. It theoretically depends on architecture of Operating System. 32 bit OS will have maximum range of 4 G VAS, it's calculated
    like a process ruining on 32 bit system can address max up to 2^32 locations ( which is equivalent to 4 G). Similarly for 64 bit max VAS will be 2^64 which is theoretically infinite. To make things feasible maximum VAS for 64 bit system is kept to 8 TB. Now
    VAS acts as layer of abstraction an intermediate .Instead of all request directly mapping to physical memory it first maps to VAS and then mapped to physical memory so that it can manage request for memory in more coordinated fashion than allowing process
    to do it ,if not it will  soon cause memory crunch.Any process when created on windows will see virtual memory according to its VAS limit.
    Please read
    This Article for detailed information
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • Primary Key supported by a non-unique index?

    Encountered a weird situation today. A utility we setup which allows Analysts to restore data into their tables, started failing when it attempted to drop an index. The index was supporting a Primary Key. Makes sense. But our script was supposed to only be attempting to drop/recreate non-unique indexes. Turns out the supporting index on the Primary Key was non-unique, and to the best of my knowledge came about as follows:
    SQL> create table junk (f number(1));
    Table created.
    SQL> create index junk_ix on junk(f);
    Index created.
    SQL> select UNIQUENESS from DBA_INDEXES where index_name = 'JUNK_IX';
    UNIQUENES
    NONUNIQUE
    SQL> alter table forbesc.junk add constraint junk_pk primary key (f) using index junk_ix;
    Table altered.
    SQL> select UNIQUENESS from DBA_INDEXES where index_name = 'JUNK_IX';
    UNIQUENES
    NONUNIQUE
    SQL> insert into junk values (1);
    1 row created.
    SQL> insert into junk values (1);
    insert into junk values (1)
    ERROR at line 1:
    ORA-00001: unique constraint (FORBESC.JUNK_PK) violated
    SQL> select index_name from dba_constraints where constraint_name = 'JUNK_PK';
    INDEX_NAME
    JUNK_IXWhat I can't figure out is how a non-unique index is enforcing uniqueness. I thought that it was the key in that very same process. I thought that perhaps an index with the 'SYS_123456' was getting created, perhaps, but I couldn't find one:
    SQL> select object_name, object_type from dba_objects order by created desc;
    OBJECT_NAME   OBJECT_TYPE
    JUNK_IX     INDEX
    JUNK     TABLE
    ...How is the uniqueness getting enforced in this case? This is in Oracle 11.1.0.7
    Thanks,
    --=Chuck

    It has always been that way. Oracle can, and will, use a non-unique index to enforce a PK constraint, The existing index just needs to have the PK column(s) as the leading column(s) of the index:
    SQL> create table t (id number, id1 number, descr varchar2(10));
    Table created.
    SQL> create index t_ids on t(id, id1);
    Index created.
    SQL> select index_name from user_indexes
      2  where table_name = 'T';
    INDEX_NAME
    T_IDS
    SQL> alter table t add constraint t_pk
      2  primary key (id);
    Table altered.
    SQL> select index_name from user_indexes
      2  where table_name = 'T';
    INDEX_NAME
    T_IDS
    SQL> insert into t values (1, 1, 'One');
    1 row created.
    SQL> insert into t values (1, 2, 'Two');
    insert into t values (1, 2, 'Two')
    ERROR at line 1:
    ORA-00001: unique constraint (OPS$ORACLE.T_PK) violatedJohn

  • Impact of creating a non-clusterd index on a huge transaction table?

    Hello Everyone,
    We have a transaction table containing 10 million records and everyday a million records will be inserted. We don’t have any clustered index on this table as this is a transaction table (more than 10 columns to uniquely identify a row). We
    do have some SPs which in turn some reports getting generated using this table. In order to improve the performance of an SP, we created a non-clustered index on this table and we found a huge performance gain.
      Here comes my question - will this (creation of non-clustered index) impacts my table data load performance or other reports generation?
    Any suggestions will be appreciated.
    Many Thanks!
    Rajasekhar.

    Hello Rajasekhar, 
    First identify this table and corresponding columns usage. Through SP_depends system procedure you can identify this table dependencies. 
    Then look at complex queries and it's execution plans. You can get an output recommendations of appropriate missing indexes. 
    Now you can try to create appropriate indexes. Always I suggest you to limit the index count if you are inserting/updating large volume records. Also if possible create clustered index. 
    One more option, you can horizontally partitioned the table and move data to multiple filegroups. Based of range of data your query performance also improve a lot. 
    To apply partition for existing table, you should take backup and recreate from scartch. 
    Check this link : http://www.mssqltips.com/sqlservertip/2888/how-to-partition-an-existing-sql-server-table/
    Best Regards, 
    Ashokkumar.
    Ashokkumar

  • Non Clustered Indexing not working for SQL server 2005

    I have create two non clustered index on two particular tables. Now the problem is its working fine..but after restarting my server its working stop and then again I have to delete that index and recreate it.

    try these links 
    http://blog.sqlauthority.com/2009/02/07/sql-server-introduction-to-force-index-query-hints-index-hint/
    http://blog.sqlauthority.com/2009/02/08/sql-server-introduction-to-force-index-query-hints-index-hint-part2/
    http://www.brentozar.com/archive/2013/10/index-hints-helpful-or-harmful/
    Hope it Helps!!

  • Effect of Force use of non-existing index in program

    Hi,
    What is the Effect of Force use of non-existing index in program?
    We have forced the use of a custom index in our program, i want to know the effect in the program if in the future this index will be deleted or removed from the database?
    Thanks a lot!

    Hi Freishz,
    >
    freishz wrote:
    > What is the Effect of Force use of non-existing index in program?
    > We have forced the use of a custom index in our program, i want to know the effect in the program if in the future this index will be deleted or removed from the database?
    Hints note, it is a hint not a command, are ignored by the optimizer if they are not
    syntactically and/or semantically correct. An index hint pointing to a non-exisitng index
    is semantically not correct -> will be ignored. (A normal costing with the available indexes
    is done).
    Kind regards,
    Hermann

  • Transactional Replication: Non-Clustered Indexes not copying.

    Hello,
    I set up replication on our servers at work to streamline some procedures we run daily/weekly on them.
    This copies around 15 articles from two databases on the "Master" server to another server used for execution purposes. For the most part it was a pretty straight forward task and it seemed to work nicely; but I realised after some investigation that the
    non-clustered indexes weren't copying over to the child server.
    I set the non-clustered indexes property in the properties of the publishing articles to "True" and generated a new snapshot, this seemed to work, but I've come into work this morning to find the property has reset to "False" and I have no indexes on the
    table again. Why is this happening and is there any way I can resolve the matter so the indexes are copied over concurrently?
    Thanks in advance for your advice.
    JB

    I actually solved this.
    You can use a post-replication SQL script to create the indexes. Whatever articles you're publishing open up the indexes drop down list of the article in object explorer, right-click on an index and hover over Script Index as, then Create-to, then click
    New Query Window editor.
    Up will pop up a new query window with the resulting index. Work your way through all the indexes on all the articles of the publication, copy and pasting just the create index line and below of each script, pull them all together into one query window.
    Once you're done find a safe folder somewhere on your harddrive and save the SQL query as an .sql file with a sensible name.
    Right click on the publication and goto properties. Click on the "Snapshot" tab, in there; there should be a section saying "Run additional scripts". Choose the browse button next to "After applying the Snapshot; execute this script:"
    Navigate to your script file and choose it. Once done click ok and it'll prompt you that something has changed and if you'd like to generate a new snapshot, make sure you do or it won't work.
    That's it, you'll find once the publication has bulk copied over the the subscriptions successfully there are non clustered indexes on the tables. Pretty simple!

  • Transactional Replication Not replicating non-clustered Indexes

    Hi
    I have created a transactional replication.I am sure that I have configured it to replicate Non-Clustered indexes,
    but It does not do so.
    I tried several times to reinitialize the subscription,but still no luck.
    Regards

    It is True for sure.
    But the problem is solved.I had to wait until the Initialize process get completed.
    But I am sure that this problem happened before.Sometimes it works fine but sometimes not.
    Hi ArashMasroor,
    According to your description, it seems that you encounter the issue that non-clustered indexes property is reset to “False” sometimes.
    To work around this issue, you can use a post-replication SQL script to create the indexes. Whatever articles you’re publishing open up the indexes drop down list of the article in object explorer, right-click on an index and levitate over Script Index as,
    then Create-to, then click New Query Window editor.
    Up will pop up a new query window with the resulting index. Work your way through all the indexes on all the articles of the publication, copy and pasting just the create index line and below of each script, pull them all together into one query window.
    Once you’re done find a safe folder somewhere on your hard drive and  save the SQL query as an .sql file with a sensible name. Then you can execute this script after applying the Snapshot. For more details, please review this
    blog.
    There is also a similar thread for your reference.
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b0f3870d-1a65-4384-a17b-96825ec5f098/transactional-replication-nonclustered-indexes-not-copying?forum=sqlreplication
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • [svn:fx-trunk] 11641: A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks , not just alpha masks.

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

  • Patch 11072246  Addresses non-optimal index use

    Hi,
    on 11.2.0.3.0 on Win 2008
    the patch 11072246 Addresses non-optimal index use when an index column is in descending order.
    How can we know if we should apply this patch or not ?
    Until now no user has found a problem like this. Does it mean that we have not non-optimal index use at all ?
    thanks and regards.

    thank you. yes , 13965211 is superseded.
    But in 16774393 ( Windows Patch 20) , non-optimal index use when an index column is in descending order is not addressed.
    Regards.

  • REBUILD INDEX vs DROP/CREATE INDEX

    Hi there,
    Does anyone has already got some performance degradation after REBUILD INDEXes ? Would it be better to perform DROP/CREATE INDEX instead ?
    Thank you very much for anu reply.
    Best regards,
    Helena

    Hi,
    >>so is it then better to DROP/CREATE them ?
    Well, In fact I learned that when you rebuild an index, Oracle creates a new index from the old index and does not perform sorting while building the new index, which results in performance enhancement. In this case, depending of the size of your data it's necessary sufficient space on a tablespace for storing the old as well as the new index (while creating the new index). Other advantage, is that Oracle can use the old index for answering queries while it builds the new index too using [alter index <index_name> rebuild online].
    Cheers

  • Unable to extend index name of the index by 8 in tablespace

    Hello,
    I am not a DBA and do not have much experience in Oracle. When I was trying to restore the backup of my application, I received the following error. I could not able to proceed further in my tasks.
    ORA-01654: unable to extend index <name of the index> by 8 in tablespace <name of the Index tablespace>The following query was used to create the table space. Oracle version is 10g.
    CREATE TABLESPACE TS_JIRA
    DATAFILE 'D:\oracle\product\10.2.0\oradata\jiraadmi\TS_JIRA.dbf' SIZE 100M REUSE
    AUTOEXTEND ON NEXT 10M MAXSIZE 200M
    MINIMUM EXTENT 64K
    DEFAULT STORAGE ( INITIAL 64K NEXT 64K MINEXTENTS 1 MAXEXTENTS UNLIMITED PCTINCREASE 0);I do not know how to extend the size of the tablespace. Can anyone help to sort out this issue?
    Thanks in advance
    Ram

    Hi Ram;
    I suggest also review below doc for your future issue
    TROUBLESHOOTING GUIDE (TSG) - UNABLE TO CREATE / EXTEND Errors [ID 1025288.6]
    Overview Of ORA-01654: Unable To Extend Index %s.%s By %s In Tablespace %s [ID 146595.1]
    OERR: ORA 1654 unable to extend index <name.name> by <num> for tablespace <nam [ID 19049.1]
    I belive they will answer all your question ;)
    PS:Please dont forget to change thread status to answered if it possible when u belive your thread has been answered, it pretend to lose time of other forums user while they are searching open question which is not answered,thanks for understanding
    Regard
    Helios

  • Order of indexed columns in the index

    Hi Gurus,
    I have a small problem in front of me and I wud like to take some inputs
    from you Gurus.Here is question
    1. Is order of the index is important in CBO?
    say
    1.I have a concatenated index on col1,col2
    2.In the sql statement's used in my project I have statements "where
    col1=1 and col2 = 1" as well as
    "where col2=1 and col1=1" and my opinion is that CBO will use the Index
    in both the scenarios( I have cheked RBO for the same and RBO is able to
    use the index) whereas some senior persons out here are telling
    otherwise..... that it will not use the index for "where col2=1 and
    Col1=1)
    pls clarify
    Cheers
    Sriram Kumar

    When I attended an Oracle 8i SQL Statement Tuning Workshop, I believe I understood things as in the response above. However, the class was applicable to Oracle 8.1.5 and I am now using Oracle 8.1.7, so some things may have changed. I have included a test of various scenarios below. I would have expected all except the last one to use the index, because col2 is not the leading edge of the composite index on col1, col2. Much to my surprise it also used the index there.
    SQL> CREATE TABLE test_table AS
      2  SELECT empno col1, mgr col2 FROM emp
      3  /
    Table created.
    SQL> UPDATE test_table
      2  SET    col1 = 1, col2 = 1
      3  WHERE  col1 = 7782
      4  AND    col2 = 7839
      5  /
    1 row updated.
    SQL> CREATE INDEX test_idx
      2  ON test_table (col1, col2)
      3  /
    Index created.
    SQL> ANALYZE TABLE test_table
      2  COMPUTE STATISTICS
      3  FOR TABLE
      4  FOR ALL INDEXES
      5  FOR ALL INDEXED COLUMNS
      6  /
    Table analyzed.
    SQL> SET AUTOTRACE ON EXPLAIN
    SQL> SELECT * FROM test_table
      2  WHERE col1 = 1 AND col2 = 1
      3  /
          COL1       COL2                                      
             1          1                                      
    1 row selected.
    Execution Plan
       0                                                       
    SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=6)  
       1    0                                                  
      INDEX (RANGE SCAN) OF 'TEST_IDX' (NON-UNIQUE) (Cost=1 Card
    =1 Bytes=6)                                                
    SQL> SELECT * FROM test_table
      2  WHERE col2 = 1 AND col1 = 1
      3  /
          COL1       COL2                                      
             1          1                                      
    1 row selected.
    Execution Plan
       0                                                       
    SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=6)  
       1    0                                                  
      INDEX (RANGE SCAN) OF 'TEST_IDX' (NON-UNIQUE) (Cost=1 Card
    =1 Bytes=6)                                                
    SQL> SELECT * FROM test_table
      2  WHERE col1 = 1
      3  /
          COL1       COL2                                      
             1          1                                      
    1 row selected.
    Execution Plan
       0                                                       
    SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=6)  
       1    0                                                  
      INDEX (RANGE SCAN) OF 'TEST_IDX' (NON-UNIQUE) (Cost=1 Card
    =1 Bytes=6)                                                
    SQL> SELECT * FROM test_table
      2  WHERE col2 = 1
      3  /
          COL1       COL2                                      
             1          1                                      
    1 row selected.
    Execution Plan
       0                                                       
    SELECT STATEMENT Optimizer=CHOOSE (Cost=1 Card=1 Bytes=6)  
       1    0                                                  
      INDEX (FULL SCAN) OF 'TEST_IDX' (NON-UNIQUE) (Cost=1 Card=
    1 Bytes=6)                                                 

Maybe you are looking for

  • Changing Fabric name in Fabric Manager

    How do you change the name of the Fabric in the Logical Domains section of Fabric Manager?

  • NoClassDefFoundError on EJB WebService

    Hello guys, I'm facing a tricky problem.. I developed a Web Service that uses a ejb, my problem arrises when I'm trying to access a SAP backend using a JCO (i need references to a public part named com.sap.aii.proxy.framework) The ejb generates class

  • Update 11.2 won't install to windows vista 64bit

    I've received an update message. that 11.2 update is ready for download. The download happens but it will not install on my laptop. I'm using Chrome. O/S is Windows Vista 64-bit. This problem has never happened before. Please help

  • May 3 InDesign SDK Workshop in Seattle: Enrollment about to close

    Registration for InDesign SDK Dev Workshop in @CSBU Dev Summit in Seattle officially closes April 16. We still have spots available, but late enrollment causes us some logistical hassles. We might or might not accept latecomers, and there might be an

  • Missing files of purchased tracks

    I have a 24"iMac with updated OS and iTunes 10.1.I . I also have a 4 yo iBook. I have synched my iPod and iPhone to both of these at different times. My problem now is on my iMac. I have 97 files that are missing with the explanation "The song could