DOMAIN INDEX
Description
Selects from a domain index.
Versions
This operation is implemented in the following versions
| |
| 8.1.5 |
| 8.1.6 |
| 8.1.7 |
| 9.0.1 |
| 9.2.0 |
| 10.1.0 |
| 10.2.0 |
|
Example
This example demonstrates a DOMAIN INDEX operation on a Oracle Text index.
In Oracle 9.2, Oracle Text is installed by DBCA. Alternatively it can be
installed manually by running the $ORACLE_HOME/ctx/admin/dr0inst.sql script
This example was developed using Oracle 9.2.0.1 on Windows 2000
This example requires the following table and index definitions
CREATE TABLE t1
(
c1 NUMBER PRIMARY KEY,
c2 VARCHAR2(30)
);
INSERT INTO t1 VALUES (1,'One');
INSERT INTO t1 VALUES (2,'Two');
INSERT INTO t1 VALUES (3,'Three');
COMMIT;
CREATE INDEX i1 ON t1 (c2)
INDEXTYPE IS CTXSYS.CONTEXT;
The table does not need to be analysed
The statement
SELECT c1
FROM t1
WHERE CONTAINS (c2,'Two') > 0;
generates the following execution plan
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'T1'
2 1 DOMAIN INDEX OF 'I1'
|