暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

kingbaseES基础 sys_index indisvalid 设置索引不可用

Server:CentOS 7.2.1511
KingbaseES:V8R6C5B23

sys_index indisvalid 设置索引不可用

test=# select * from sys_stat_user_indexes where indexrelname='index_c1'; relid | indexrelid | schemaname | relname | indexrelname | idx_scan | idx_tup_read | idx_tup_fetch -------+------------+------------+---------+--------------+----------+--------------+--------------- 16388 | 16397 | public | t1 | index_c1 | 0 | 0 | 0 (1 行记录) test=# \x 扩展显示已打开. test=# select * from sys_index where indexrelid=16397; -[ RECORD 1 ]--+------ indexrelid | 16397 indrelid | 16388 indnatts | 1 indnkeyatts | 1 indisunique | f indisprimary | f indisexclusion | f indimmediate | t indisclustered | f indisvalid | t indcheckxmin | f indisready | t indislive | t indisreplident | f indkey | 1 indcollation | 0 indclass | 1978 indoption | 0 indexprs | indpred | test=# update sys_index set indisvalid=false where indexrelid=16397; UPDATE 1 test=# select * from sys_index where indexrelid=16397; -[ RECORD 1 ]--+------ indexrelid | 16397 indrelid | 16388 indnatts | 1 indnkeyatts | 1 indisunique | f indisprimary | f indisexclusion | f indimmediate | t indisclustered | f indisvalid | f indcheckxmin | f indisready | t indislive | t indisreplident | f indkey | 1 indcollation | 0 indclass | 1978 indoption | 0 indexprs | indpred | test=# \dS+ t1 数据表 "public.t1" 栏位 | 类型 | 校对规则 | 可空的 | 预设 | 存储 | 统计目标 | 描述 ------+---------+----------+--------+------+-------+----------+------ c1 | integer | | | | plain | | 索引: "index_c1" btree (c1) INVALID 访问方法 heap test=# update sys_index set indisvalid=true where indexrelid=16397; UPDATE 1 test=# \dS+ t1 数据表 "public.t1" 栏位 | 类型 | 校对规则 | 可空的 | 预设 | 存储 | 统计目标 | 描述 ------+---------+----------+--------+------+-------+----------+------ c1 | integer | | | | plain | | 索引: "index_c1" btree (c1) 访问方法 heap

学习资料


欢迎各位同学一起来交流学习心得!

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

文章被以下合辑收录

评论