You can also modify the script to search for may be a bigger number of distinct rows, by changing the number '1' in the script.
set heading off
set echo off
EXEC DBMS_STATS.gather_table_stats('DEV_SOAINFRA','WFTASK');
select 'create index DEV_SOAINFRA.'||column_name||'_idx on DEV_SOAINFRA.'||table_name||' ('||column_name||');' from all_tab_columns where table_name = 'WFTASK'and num_distinct>1 and column_name like '%ATTRIBUTE%';
Output will be in the format:
create index DEV_SOAINFRA.PROTECTEDNUMBERATTRIBUTE1_bpmflex_idx on DEV_SOAINFRA.
WFTASK (PROTECTEDNUMBERATTRIBUTE1);
create index DEV_SOAINFRA.PROTECTEDTEXTATTRIBUTE13_bpmflex_idx on DEV_SOAINFRA.W
FTASK (PROTECTEDTEXTATTRIBUTE13);
No comments:
Post a Comment