ヘッダーをスキップ
Oracle TimesTen In-Memory Database APIリファレンス・ガイド
リリース7.0
E05170-03
  目次へ
目次
索引へ
索引

前へ
前へ
次へ
次へ
 

ttRedundantIndexCheck

説明

指定された表(または現在のユーザーのすべての表)をスキャンして、冗長索引を見つけます。冗長索引の名前および削除する索引に関するアドバイスを返します。

アクセス制御

アクセス制御がTimesTenのインスタンスに対して有効である場合、このプロシージャには権限は必要ありません。

構文

ttRedundantIndexCheck('tblname') 

パラメータ

ttRedundantIndexCheckには、次のパラメータがあります。

パラメータ
データ型
説明
tblName
TT_Char (61)
アプリケーション表の名前。表の所有者を含めることができます。NULLまたは空の文字列を値として指定すると、現在のユーザーのすべての表の冗長索引がスキャンされます。

結果セット

ttRedundantIndexCheckは次の結果を返します。

データ型
説明
redundancy
TT_VARCHAR (1024) NOT NULL
冗長索引の名前および削除する索引に関するアドバイス。

主キーを持つ表「y」を作成します。次に、索引iを作成します。冗長索引が作成されているという警告が返されます。別の索引i1を作成します。
コマンドが失敗し、エラーが返されます。このプロシージャをコールして、警告を表示します。

CREATE TABLE y (ID tt_integer primary key);

CREATE INDEX i ON y (id);

Warning 2240: New non-unique index I has the same key columns as
existing unique index Y; consider dropping index I

CREATE INDEX i1 ON y (id);

2231: New index I1 would be identical to existing index I
The command failed.

CALL ttredundantindexcheck ('y');

< Non-unique index SCOTT.Y.I has the same key columns as unique index SCOTT.Y.Y; consider dropping index SCOTT.Y.I >

1 row found.