Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How come Oracle reverse key indexes don't cause slow random writes?

Oracle's reverse key indexes solve the problem of contention for leaf blocks in the right side of a B-tree index. But the flip side is that reverse key indexes will cause random writes. Why is in memory contention worse than disk seeking to do random writes?

edit: Microsoft advises essentially the same thing for SQL Server http://www.microsoft.com/en-us/download/details.aspx?id=26665

like image 881
Bruno Martinez Avatar asked Jan 29 '26 08:01

Bruno Martinez


1 Answers

The contention stops the execution of the user session, whereas writes (apart from direct path) are asynchronous -- they are carried out by the DBWR process, and the only synchronous disk write is the LGWR writing the redo log entries.

A larger problem might be that you are more likely under some circumstances to need more of the index segment in memory, as "recent" changes are spread over a great many more blocks than on a regular index, so it might be worth keeping an eye on segment statistics, but even if the problem arises it's likely to be of a small magnitude relative to all the other stuff you could be spending your time on.

like image 92
David Aldridge Avatar answered Jan 31 '26 06:01

David Aldridge



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!