Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7720199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:36:15+00:00 2026-06-01T03:36:15+00:00

Say I have a table with an auto-incrementing surrogate key. Would this be a

  • 0

Say I have a table with an auto-incrementing surrogate key.

Would this be a good case for using a reverse index?

Am I correct in stating:

Insertions (into index) would be faster .. since new values would be inserted randomly, instead of always going to the right most leaf (constantly forcing rebalances).

Index look ups would be marginally slower .. since the db would have to spend (a little) of time reversing the index.

Since it’s a surrogate key .. I wouldn’t really need range scan ability (which you can’t do with reverse indexes).

(Note, I’m not using Oracle RAC)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:36:16+00:00Added an answer on June 1, 2026 at 3:36 am

    In general, if you’re not using RAC, there would be no reason to use a reverse-key index.

    From a performance standpoint, you’re much better off having one or two hot blocks at any given point in time that are subject to inserts because that essentially guarantees that the hot blocks will be in the buffer cache and the INSERT won’t have to incur the cost of reading the block from disk. If you’ve got inserts going into random blocks in an index, there is a much greater probability that the block you want would have aged out of the cache and would incur the cost of a physical I/O.

    The cost of keeping an index balanced is pretty minimal but even that favors a standard index. If you’ve got a sequence generated primary key with a normal index, Oracle will do a 90/10 block split on the right-most block when that block fills up. In contrast, if you’ve got a reverse key index, Oracle has to do 50/50 block splits whenever a given block fills up. A 50/50 block split copies half the data from the old block to the new block, a 90/10 block split only copies the right-most data value to the new block. The 90/10 block split, therefore, is much cheaper than a 50/50 block split and you’d need to do roughly the same number of block splits regardless of the type of index you pick. So the cost of maintaining a regular index is less than the cost of maintaining a reverse key index even ignoring the effect of cache.

    The reason you’d consider using a reverse key index would be that you’re using RAC and you want to avoid the cost of having many RAC nodes all fighting over the same hot block. If you constantly have to ship the hot block from one node to another in order to do the next insert, it may be worthwhile to use a reverse key index instead to reduce that contention. If you have licensed the partitioning option, it would be better still to use a hash partitioned index instead (this can be done whether or not the tables is partitioned). If you haven’t licensed the partitioning option, a reverse key index may be good enough at resolving contention on the hot block to not require that you license partitioning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say I have this: CREATE TABLE `classes` ( `class_ID` INT AUTO_INCREMENT, FOREIGN KEY
Say I have this table: Person table -------------- PersonId Address table ------------ AddressId PersonAddressId
Say I have this table schema. ID AccNo Amount Say I have this data
Lets say I have one table called REVIEWS This table has Reviews that customers
Say you have a table schema such as this: friends(friendship_id, uid1, uid2, are_friends) .
I have a table that has a forced auto increment column and this column
Let's say I have a table like this (this is just a simplified example,
I have a table with four columns, say P_Key(int), Ref_Key(int), Key(String), Value(Integer). I want
I have a table: ID (auto increment, int), pass (char(5)), email (varchar(80)) This is
Say I have a table like this: create table users ( user_id int not

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.