Reverse key index

hi,
I am reading Richard Foote's notes, and he talks how reverse key indexes can stop the contention in RAC environment on an index where the values are ascending and always being entered into the right most block. But, they still wont stop the contention on the tables data block, will they? so doesnt this make disappearing the contention on the index data block futile as we're still going to have it on the tables data block?
also, when we enter an entry into the table, is a shared exclusive table lock taken on the index too?
thanks

OracleGuy777 wrote:
hi,
I am reading Richard Foote's notes, and he talks how reverse key indexes can stop the contention in RAC environment on an index where the values are ascending and always being entered into the right most block. But, they still wont stop the contention on the tables data block, will they? so doesnt this make disappearing the contention on the index data block futile as we're still going to have it on the tables data block?
also, when we enter an entry into the table, is a shared exclusive table lock taken on the index too?
See Re: reverse key index and contention in RAC
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
"Science is more than a body of knowledge; it is a way of thinking"
Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Usage of reverse key index

    Hi,
    Any body can explain the usage of reverse key index.
    Thanks and regards,

    It could be an option if you have lots of inserts simultaniously (and I mean lots not 2 a second - rather 1000'ds).
    If the index field comes like this 1000, 1001, 1002, 1003, 1004 etc etc then the very same index leaf blocks will be hit when using a "normal" index - if it is reverse, you will spread the IO load on many blocks - and might give a better performance. If reversed it will be 0001, 1001, 2001, 3001, 4001 instead (inserwise).
    BUT .... be aware when using ... between, GT og LT on those reversed indexed fields - index skip scans are not possible - so you may sacrifice performance in the selects.
    We have used it for audit records, where we had many many records being inserted from 20 simult. processes (java stuff), just reading off a jms queue and inserting. We had lots of waits - then we reversed index. And we do not have any appl. selecting the audit records.
    Mette

  • Issues with reverse key indexes and range scan

    I have a question. Why is it that reverse key indexes do not work in a range scan?
    Thanks

    Chris, well said in simple terms.
    Extract from metalink:
    Oracle8 provides the ability to create reverse key indexes. Reverse key indexes
    reverse the bytes of each indexed column with the exception of ROWID and still
    maintains the column order. Reverse key indexes are useful for Oracle Parallel
    Server environments.
    In an OPS environment, modifications to indexes are focused on a small
    set of leaf blocks. Reversing the keys of the index allows insertions to be
    distributed across all the leaf keys in the index. Reverse key indexes prevent
    queries from performing an index range scan since lexically adjacent keys
    are not stored next to each other. Reverse key indexes can also be used in
    situations where users insert ascending values and delete lower values from the
    table, thus helping to prevent skewed indexes.
    ===
    Good discussion at
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2737861489787945222::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:627823669999
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2737861489787945222::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:6163160472530
    Jaffar
    Message was edited by:
    The Human Fly

  • Reverse key indexes !!!

    Hi All,
    In reverse-key indexes, what exactly get reversed? (rowid/column val.) Can any one put some light on this?

    A question which can be quick solve by the reading of doc :
    "Specify REVERSE to store the bytes of the index block in reverse order, excluding the rowid."
    From
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5010.htm#sthref6614
    Nicolas.

  • Primary key index not working in a select  statment

    Hi ,
    I'm doing a :
    select *
    from my_table
    where B = v1 and
    A = v2 ;
    where A and B are the primary key of the table, in that table the primary key index is there and the order of the primary key definition is A first and then B.
    While testing this statment in my database the Explain Plan shows that it is using the index ok but when
    runninng in client database it is not using it becasue of the order (i think), is this something configurable that I need to ask to my DBA ?
    The solution I found was to do the select with a hint wich fix the problem , but I'm curious about why is working in my dadabase and not in the client database
    thanks in advance .
    oracle version 11g

    This is the forum for SQL Developer (Not for general SQL/PLSQL questions). Your question would be better asked in the SQL and PL/SQL forum.
    Short answer: The execution plan used will depend on optimizer settings and table/index statistics. For example if the table has very few rows it may not bother using the index.

  • Concept about Primary Key index

    I have a partitioned table as follow:
    CREATE TABLE TEST
    (TEST_KEY NUMBER(10,0) NOT NULL
    ,FOREIGN_KEY NUMBER(10,0) NOT NULL
    ,PARAM_ID NUMBER(10,0)
    ,PARAM_VALUE VARCHAR2(256)
    PARTITION BY HASH (operation_key) PARTITIONS 15
    STORE IN (TEST_R1_TS, TEST_R2_TS, TEST_R3_TS, TEST_R4_TS, TEST_R5_TS)
    CACHE
    I also created a partitioned index for the TEST_KEY to be used as primary key index.
    CREATE INDEX TEST_PK_IDX ON PARAMETER_1(TEST_KEY) LOCAL
    STORE IN (TEST_i1_ts, TEST_i2_ts, TEST_i3_ts, TEST_i4_ts, TEST_i5_ts);
    When I try to run alter table to add primary key, I got index not exist error?
    SQL> alter table TEST add (constraint test_pk primary key (test_key) using index test_pk_idx);
    alter table parameter_1 add (constraint pa1_pk primary key (parameter_key) using index pa_pk_idx)
    ERROR at line 1:
    ORA-01418: specified index does not exist
    BUT, I could find my index in the USER_INDEXES table...
    SQL> select index_name from user_indexes where index_name like '%TEST_PK%';
    INDEX_NAME
    TEST_PK_IDX
    Why? Help is very appreciated.
    Thank you in advanced.

    check the names of the tables in the script you give ... they are different for the table and the index. When you add the constraint the table name and column name mysteriously change in the error message, so I think that you aren't showing us what actually happened.

  • Key Index

    Hi,
    Is it possible to get the index of the key I inserted in berkeley? I need to know the arrangement of the keys I inserted. Are there methods in getting the index of the keys?
    Example: I put the following in the order given:
    Order Key Index
    1st key1 0
    2nd key2 1
    3rd key3 2
    If I will get the index of key2, it should return 2.
    Thank you in advance.

    Hi,
    I will clarify a few things about how JE's storing the records to make sure we are on the same page. Also, I don't know what API you use, I assume you use the base API.
    JE stores and retrieves data using key-data pairs. You store records in a Database by calling one of the put methods on a Database handle. JE automatically determines the record's proper placement in the database's internal B-Tree using whatever key and data comparison functions that are available to it. To iterate (which I think it's what you're looking for), just call getNext() until the last database record has been read. getFirst moves the cursor to the first key/data pair of the database, and returns that pair, but if If the cursor is not yet initialized, getNext moves the cursor to the first key/data pair of the database too. All cursor operations return an OperationStatus, so just read until you no longer see OperationStatus.SUCCESS. This will give you the order.
    Also, instead of scanning the database in the record's sort order, you can use cursors to retrieve records based on how they are stored on disk by using the DiskOrderedCursor class.
    Getting Records Using the Cursor: http://docs.oracle.com/cd/E17277_02/html/GettingStartedGuide/Positioning.html
    Cursor: http://docs.oracle.com/cd/E17277_02/html/java/com/sleepycat/je/Cursor.html
    DiskOrderedCursor: http://docs.oracle.com/cd/E17277_02/html/java/com/sleepycat/je/DiskOrderedCursor.html

  • What is Foreign Key Indexes?

    We have doubt in definition of "Foreign Key Indexe",
    Please give us a clear definition.
    Thanks in advance
    Soheil

    We have doubt in definition of "Foreign Key Indexe",
    Please give us a clear definition.
    Thanks in advance
    Soheil

  • How to see wether the index is a primary key index or not

    hi,
    can anybody let me know how to get wether the index is made on the primary key (i.e primary key index)
    can we do by querying the user_constriants table.
    plz let me know..

    Maran.Viswarayar wrote:
    Vijay,
    Was that different from Anurag's reply?Yes it was. Anurag didn't include the index_name in his query.
    It is possible for the index name to be different from the constraint_name, so if you listed just the primary key constraint names you might decide that a given index was not a "primary key" index because you couldn't find a constraint with the matching name.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Creating an unique index instaed of using primary key index

    Hi ,
    I heard in a debate sometimes it's better to create a unique index on a column and using it instaed of using primary key index in oracle.I couldn't understand what the reason propely.
    Can anyone please help me in thsi topic if it is a valid one .
    Thanks in advance

    Hi,
    They are exactly NOT identical.
    1. Unique key can have NULL values where primary keys can't.
    2. Primary key is fundamentally those keys which do not change. I mean updating a primary key is not a good idea.
    SQL> drop table test;
    Table dropped.
    SQL> create table test ( a number(2));
    Table created.
    SQL> ed
    Wrote file afiedt.buf
      1* create unique index test_idx on test(a)
    SQL> /
    Index created.
    SQL> ed
    Wrote file afiedt.buf
      1* insert into test values(NULL)
    SQL> /
    1 row created.
    SQL> drop table test;
    Table dropped.
    SQL>
    SQL> create table test ( a number(2) primary key);
    Table created.
    SQL> insert into test values(NULL);
    insert into test values(NULL)
    ERROR at line 1:
    ORA-01400: cannot insert NULL into ("HR"."TEST"."A")
    SQL>Cheers,
    Edited by: Avinash Tripathi on Nov 24, 2009 11:17 AM

  • Problem with capturing Primary Key Index

    Hi
    I am capturing certain tables and in the mean process i observed that all the indexes are getting captured except the primary key index.
    Any Suggestions on this?
    Thanx,
    Suji

    Hi,
    I was unable to reproduce this behavior on OWM 10.1.0.8. It appears that you have a SR open for this issue, so I would suggest to continue with that process.
    Regards,
    Ben

  • Drop/recreate primary key index

    Any suggestions for dropping/recreating a primary key index? The index has to be dropped/recreated and not rebuilt due to ORA-600s.
    Do I simply disable/re-enable the primary key constraint? The database is 10g.
    Edited by: nickw2 on Apr 1, 2009 5:06 PM

    ORA-600 errors are a handful, I usually check metalink or ask ORacle support for help.
    Anyways, If you want to recreate the primary key index, have you tried dropping the primary key constraint and adding it back?
    ALTER TABLE tablename
    DROP CONSTRAINT pk_name;
    ALTER TABLE tablenames
    ADD CONSTRAINT pk_name PRIMARY KEY (column_name);

  • Creating Primary Key Index

    Hi,
    Iam trying to create a Primary Index on Large table and Iam using the Parallelism to make it fast. I have used the following script to create a Primary key Index.
    CREATE UNIQUE INDEX FLX_ARCH.FUND_SEC_RESULT_STAT_ARCH_PK
    ON FLX_ARCH.FUND_SEC_RESULT_STAT_ARCH
    (FUND_SEC_RESULT_MAP_INST,RATES_RULE_ID,BASE_LOCAL_FLAG,EFFECTIVE_DATE)
    TABLESPACE FLX_PERF_I
    parallel;
    Index created.
    Elapsed: 01:43:37.37
    Index got created in 1 hour 43 minutes. But when Iam adding constarint to those columns, it is taking almost 12hours with or without parallelism.
    ALTER TABLE FLX_ARCH.FUND_SEC_RESULT_STAT_ARCH
    ADD CONSTRAINT FUND_SEC_RESULT_STAT_ARCH_PK
    PRIMARY KEY
    (FUND_SEC_RESULT_MAP_INST,RATES_RULE_ID,BASE_LOCAL_FLAG,EFFECTIVE_DATE)
    parallel
    Would you please let me know what could be the problem and how can we add the Primary constraint fast.
    Your early response is much appreciated.
    Thanks and Regards
    Suresh. D

    Would you please let me know what could be the problem and You have presented no details that indicate any problem exists.
    how can we add the Primary constraint fast. Fast is relative.
    If I asked you to make my snail fast, could you do so?
    ALTER SESSION SET SQL_TRACE=TRUE;
    ALTER TABLE FLX_ARCH.FUND_SEC_RESULT_STAT_ARCH
    ADD CONSTRAINT FUND_SEC_RESULT_STAT_ARCH_PK
    PRIMARY KEY
    (FUND_SEC_RESULT_MAP_INST,RATES_RULE_ID,BASE_LOCAL_FLAG,EFFECTIVE_DATE)
    parallel
    ALTER SESSION SET SQL_TRACE=FALSE;
    now find the trace file within ./udump folder
    tkprof <trace_file.trc> trace_results.txt explain=<username>/<password>
    By inspecting the trace file you will be able to see where time is being spent.
    With this knowledge, you may or may not be able to determine the bottleneck & therefore improve it

  • Nobody can help me? What is Foreign key indexes?

    We have doubt in definition of "Foreign Key Indexe",
    Please give us a clear definition.
    Thanks in advance
    Soheil

    We have doubt in definition of "Foreign Key Indexe",
    Please give us a clear definition.
    Thanks in advance
    Soheil

  • WEP with key index 3

    In my organization the WIFI is set on key index 3. Is there anyway to connect the IPAD as I do not find any possibility to set the key index 3 on the WIFI settings?
    thanks

    The following article says:
    Check the wireless security option of your Wi-Fi router:
    If you are using WEP security and have multiple WEP keys on your Wi-Fi router, try configuring your Wi-Fi router to use only a single WEP key in key index 1.
    Consider using WPA or WPA2 instead. WPA and WPA2 encryption protocols are newer, more effective security options for wireless networks than the older WEP protocol.
    http://support.apple.com/kb/TS3237
    Thus, it appears you may only be able to use key index 1

Maybe you are looking for

  • I can't enter to youtube? Why can't i use the internet in my campus from college?

    i can't enter to youtube? Why can't i use the internet in my campus from college?

  • Multiple X axes in DIAdem 9.1

    Is it possible to have multiple X-axis scales for a 2-D plot in DIAdem 9.1?  I have no problem with multiple y axes but I would also like multiple x axes as well. Thanks, Tom

  • Apple TV and Samsung

    I saw that there were previous problems using Apple TV on a Samsung television set. I have a 40" 6000 series television. If the HDMI port is a problem, will using the other methods to set it up work?

  • Is Aperture 3.3 for me? I used to use picnik (don't laugh) :)

    I recently upgraded to a 2012 MacBook Air 11 inch with 4GB of memory, 4,000 graphics etc. I take pictures with my Sony Cyber-shot 14.1 MP, 4x optical zoom, retractable lenses that says Carl Zeis Vario Tessar 2,7-5,7/4,7-18,8, my iPhone 4s, and my bui

  • ConnectionPool - MySql Driver Class Not Found

    am trying to set up a connection pool for a MySql Database. I am using the Driver package: mysql-connector-java-3.0.15-ga When I try to ping the DataSource I get the following exception reported: java.lang.ClassNotFoundException: com.mysql.jdbc.jdbc2