What is meant by Virtual Indexes in Oracle? Virtual Indexes are another undocumented feature used by Oracle. Virtual indexes, as the name suggests are pseudo-indexes that will not behave the same way that normal indexes behave, and are meant for a very specific purpose. A virtual index is created in a slightly different manner than the normal indexes. A virtual index has no segment pegged to it, i.e., the DBA_SEGMENTS view will not show an entry for this. Oracle handles such indexes internally and few required dictionary tables are updated so that the optimizer can be made aware of its presence and generate an execution plan considering such indexes.As per Oracle, this functionality is not intended for standalone usage. It is part of the Oracle Enterprise Manger Tuning Pack (Virtual Index Wizard). The virtual index wizard functionality allows the user to test a potential new index prior to actually building the new index in the database.It allows the CBO to evaluate the potential new index for a selected SQL statement by building an explain plan that is aware of the potential new index. This allows the user to determine if the optimizer would
use the index, once implemented.
What are the attributes of the Virtual Indexes? a. These are permanent and continue to exist unless we drop them. b. Their creation will not affect existing and new sessions. Only sessions marked for Virtual Index usage will become aware of their existence. c. Such indexes will be used only when the hidden parameter "_use_nosegment_indexes" is set to true. d. The Rule based optimizer did not recognize Virtual
Indexes when I
d. Dictionary view DBA_SEGMENTS will not show an entry for Virtual Indexes. The table DBA_INDEXES and DBA_OBJECTS will have an entry for them in Oracle 8i; in Oracle 9i onwards, DBA_INDEXES no longer show Virtual Indexes. e. Virtual Indexes cannot be altered and throw a "fake index" error! f. Virtual Indexes can be analyzed, using the ANALYZE
command or DBMS_STATS package, but the statistics cannot be viewed (in
Oracle 8i, DBA_INDEXES will not show this either). Oracle may be generating
artificial statistics and storing it somewhere for referring it later.
Have a Oracle Question
Oracle Books
Oracle Application
Oracle Home
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|