ttRedundantIndexCheck
Required Privilege
This procedure requires no privilege.
Usage in TimesTen Scaleout and TimesTen Classic
This procedure is supported in TimesTen Classic.
TimesTen Scaleout applications can call this built-in procedure.
In TimesTen Scaleout, this procedure runs locally on the element from which it is called.
Syntax
ttRedundantIndexCheck('tblname')Parameters
ttRedundantIndexCheck has the parameter:
| Parameter | Type | Description |
|---|---|---|
|
|
|
Name of an application table. Can include table owner. If a value of Using a synonym to specify a table name is not supported. |
Result Set
ttRedundantIndexCheck returns the result:
| Column | Type | Description |
|---|---|---|
|
|
|
The names of redundant indexes and a suggestion for which index to drop. |
Examples
Create table y with a primary key. Then create index i. TimesTen returns a warning that a redundant index is being created. Create another index, i1. The command fails and TimesTen returns an error. Call this procedure to show the warnings.
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.