Oracle 8i Data Cartridge Developer's Guide
Release 2 (8.1.6)

A76937-01

Library

Product

Contents

Index

Prev Up Next

SBTREE: An Example of Extensible Indexing, 8 of 8


Usage examples

One typical usage scenario is described below. Create a table and populate it.

CREATE TABLE t1 (f1 number, f2 VARCHAR2(200));
INSERT INTO t1 VALUES (1, 'adam');
insert into t1 VALUES (3, 'joe');

Create a sbtree index on column f2. The create index statement specifies the indextype to be used.

create index it1 on t1(f2) 
indextype is sbtree;

Execute a query that uses one of the sbtree operators. The explain plan output for the same shows that the domain index is being used to efficiently evaluate the query.

SELECT * FROM t1 WHERE eq(f2, 'joe') = 1;

Explain Plan Output

             OPERATIONS                     OPTIONS                        OBJECT_NAME            
       
             ------------------------------ ------------------------------ -------------
             SELECT STATEMENT                                                                            
             TABLE ACCESS                   BY ROWID                       T1                     
             DOMAIN INDEX                                                  IT1                    


Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index