Professional Documents
Culture Documents
Summary
Symptom
Other terms
FAQ
Solution
Each table entry is also taken into account in the index - unless all
the indexed columns of a table entry have the value NULL. In this
case, the entry is not included in the index.
08.11.2010 Page 1 of 9
SAP Note 912620 - FAQ: Oracle indexes
The most important reason for using indexes is to allow quicker access
to table data. Instead of having to read the complete table, the
system can use an appropriate index to quickly find the table entries
that correspond to the conditions.
o Root block:
The root block forms the access to the index. There is just one
root block. It contains navigation information and can have various
successive blocks at the next index level.
o Branch blocks:
Below the root block, there may be one or more levels containing
branch blocks, depending on the size of the index. The branch
blocks also contain navigation information and can have various
successive blocks at the next index levels.
o Leaf blocks:
The blocks at the last index level are known as leaf blocks. These
contain the actual index data and are linked to one another by a
pointer. They also contain a pointer to the relevant table entry in
each case in the form of the ROWID.
Indexes should generally be created using SAP tools (in other words,
transactions SE11 and SE14, transports) in the SAP environment.
If required, you can also create an index at Oracle level using the
command CREATE INDEX. Here, additional options such as PARALLEL,
NOLOGGING or ONLINE are possible.
08.11.2010 Page 2 of 9
SAP Note 912620 - FAQ: Oracle indexes
Before you decide to create a new index, you should be aware of the
following consequences:
Each index requires space and therefore adds to the growth of the
database.
o DML performance
o Mistakes in CBO
If a new index causes problems, you can quickly delete it using DROP
INDEX.
08.11.2010 Page 3 of 9
SAP Note 912620 - FAQ: Oracle indexes
All the leaf blocks of the index are scanned in the logical tree
structure.
All the blocks of the index are scanned in their physical sequence.
o B*Tree indexes
The SAP environment mainly uses B*Tree indexes, in which the values
of the indexed columns are stored in the leaf blocks.
o Bitmap indexes
Bitmap indexes are also used, above all in the BW environment (for
example, on the characteristic columns of InfoCubes). Instead of
the column values, bitmaps that specify which column values are
located under which ROWIDs are stored in the leaf blocks.
o Unique indexes
o Non-unique indexes
o Function-based indexes
08.11.2010 Page 4 of 9
SAP Note 912620 - FAQ: Oracle indexes
Index organized tables are tables that are constructed in the form
of an index. For more information, see Note 641435.
08.11.2010 Page 5 of 9
SAP Note 912620 - FAQ: Oracle indexes
o Index-monitoring
08.11.2010 Page 6 of 9
SAP Note 912620 - FAQ: Oracle indexes
o Segment statistics
SELECT
SUBSTR(OBJECT_NAME, 1, 40) SEGMENT_NAME,
SUBSTR(STATISTIC_NAME, 1, 20) STATISTIC_NAME,
VALUE "NUMBER"
FROM V$SEGMENT_STATISTICS
WHERE
OBJECT_NAME = '<index_name>' AND
STATISTIC_NAME IN ('logical reads', 'physical reads');
In general: the smaller the number of block accesses, the less the
index is required. However, consider that block accesses occur on
each index belonging to a table because of INSERT, UPDATE and
DELETE operations, even if the index is not required for actual
data access.
08.11.2010 Page 7 of 9
SAP Note 912620 - FAQ: Oracle indexes
See also Note 750631, which contains information about calculating the
costs of index accesses.
For historical reasons, many SAP indexes begin with the client column
(MANDT, CLIENT, MANDANT, ...). In many cases, this column only
increases overhead by increasing the size of the index. The client
column is only useful or advantageous in a limited number of
situations:
Header Data
Release Status: Released for Customer
Released on: 18.12.2008 09:41:41
Master Language: German
Priority: Recommendations/additional info
Category: FAQ
Primary Component: BC-DB-ORA Oracle
08.11.2010 Page 8 of 9
SAP Note 912620 - FAQ: Oracle indexes
Related Notes
Number Short Text
1109743 Use of Index Key Compression for Oracle Databases
915242 FAQ: Reverse key indexes
832343 FAQ: Clustering factor
806554 FAQ: I/O-intensive database operations
771929 FAQ: Index fragmentation
766349 FAQ: Oracle SQL optimization
750631 Approximations for cost calculation of the CBO
641435 FAQ: Oracle Index Organized Tables (IOTs)
334224 Important notes for creating indexes
105047 Support for Oracle functions in the SAP environment
08.11.2010 Page 9 of 9