3 liens privés
Ressource complète sur les index dans les bases de données
Delete index with special characters :
%% : escape character for elasticsearch
{ : escape character for unix shell
curl -XDELETE 'localhost:9200/log_%%{typeindex}_2015.12.24?pretty'
" .... 'aaa' ..." : escape ' character
curl -XDELETE "localhost:9200/log_%%{fields['type']}_2015.12.24?pretty"
List all indexes :
curl 'localhost:9200/_cat/indices?v' | grep %
alter index index-name unusable
alter index index-name rebuild
oracle : retrouver les FK qui n'ont pas d'index (source)
select
a.owner ,a.constraint_name cons_name
,a.table_name tab_name
,b.column_name cons_column
,nvl(c.column_name,'No Index') ind_column
from all_constraints a
join
ALL_CONS_COLUMNS b on a.constraint_name = b.constraint_name
left outer join
all_ind_columns c on b.column_name = c.column_name
and b.table_name = c.table_name
where constraint_type = 'R'
and a.owner not in ('SYSTEM', 'SYS', 'DBSNMP')
order by 1,3,2;