Very good example but it would be based on one condition
Frank, October 27, 2002 - 1:02 pm UTC
Thanks Tom. As always your answer is very helpful. However, the example would be based on one condition--deletions don't shack up the index tree unless a whole block is deleted. What I mean is the deletion of 2, 4, 6, ... from the index will not resulting in an automatic moving of 3,5,7, ... I think this point is mentioned/implied in your book or Lewis.
Would alter index coalesce make the space holes reusable?
October 27, 2002 - 2:03 pm UTC
Correct -- I'm using the degenerate case where the deletes are very widespread and don't end up in deleting all entries on the leaf nodes. As long as one entry is there -- that block will stay in that position in the index and if you never insert/update data to be near that entry (near the number "3" for example), it'll be a mostly empty block forever. (my book definitely goes into this - in the myths section on indexes)
Index coalescing:
</code>
http://docs.oracle.com/docs/cd/B10501_01/server.920/a96521/indexes.htm#4443 <code>
is definitely something that would help this particular situation by coalescing adjacent index blocks in the same branches -- freeing up those almost empty blocks for reuse elsewhere in the index structure.
Very useful regarding Reverse Key Index
Saroj, November 09, 2004 - 7:53 am UTC
Hi Tom,
What would be the problem if we will always use reverse key primary key indexes on tables with ID's populated by sequences?
Thanks,
Saroj.
November 09, 2004 - 9:21 am UTC
o no range scans
o you lose the 90/10 block split that is there in place just for primary keys associated with indexes.
o you'll start a myth that in Oracle all primary keys populated by sequences MUST be reverse key
o you'll chew up more CPU to reverse the bytes
If they were always to be done one way or the other -- there would be only one way. reverse key indexing is a tool, like a hammer or a drill. Use them when you've identified an issue that would benefit from their use.
Reverse key help
Katherine Harms, December 21, 2004 - 3:20 pm UTC
When I started reading, I really did not understand what "reverse key" meant, and I certainly did not understand why to use it. I was ready to try it just to see what happened. After reading this page, I know that "reverse key" won't help me on any table in my database. That is worth knowing.
how about reverse key for high inserts only
A reader, September 13, 2006 - 5:42 pm UTC
Hello Tom,
we have a system with heavy inserts. The PK is generated by a sequence. We dont do any deletes or updates. The inserts are very high at the rate of 1000/sec.
Should we or not use Reverse Key Index? Please advice/recommend.
September 14, 2006 - 9:00 am UTC
the answer is:
</code>
http://asktom.oracle.com/Misc/i-believe-strongly-there-are-only-two.html <code>
After reading this page (which basically tells what they do - gives you an understanding of the mechanics) and/or my book (which has a section on them - goes into perhaps more detail then this page) Expert Oracle Database Architecture - you should be able to make an informed judgement call as to whether they will be beneficial to you.... or not.
Thanks
A reader, September 19, 2006 - 9:20 am UTC
Tom,
I have your book, I will read it.
Appreciate your suggestion.