AppLib CREATE INDEXES
From LucidDB Wiki
Contents |
Syntax
call applib.create_indexes('select * from table(applib.show_idx_candidates(''SCHEMA_NAME'', ''TABLE_NAME'', threshold))');
Purpose
Use this to create indexes over a list of given columns. Used in conjunction with SHOW_IDX_CANDIDATES.
Warning: As the example shows, the passed schema name and table names to the inner SQL string need to be single-quoted twice.
Parameters
- sql [VARCHAR(65535)]: SQL String that results in a table of columns.
Example
call applib.create_indexes('select * from table(applib.show_idx_candidates(''IDX_CAND_TEST'', ''T1'', 90))');
select index_name from sys_root.dba_unclustered_indexes
where schema_name = 'IDX_CAND_TEST' and table_name = 'T1';
+-----------------+
| INDEX_NAME |
+-----------------+
| AUTOCREATED_C2 |
| AUTOCREATED_C3 |
+-----------------+