PG重建索引
来源:互联网 发布:sketch中文版软件 编辑:程序博客网 时间:2024/05/25 13:33
postgres=# select version();
version
------------------------------------------------------------------------------------------------------------------------
PostgreSQL 8.1.22 on x86_64-unknown-linux-gnu, compiled by GCC gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
(1 row)
REINDEX
postgres=# reindex table test; -->重建和表test有关的索引
REINDEX
postgres@linux-o8rc:~> reindexdb postgres -->重建postgres数据库下所有的索引
NOTICE: table "pg_class" was reindexed
NOTICE: table "pg_class" was reindexed
NOTICE: table "sql_features" was reindexed
NOTICE: table "sql_features" was reindexed
NOTICE: table "sql_implementation_info" was reindexed
NOTICE: table "sql_implementation_info" was reindexed
NOTICE: table "sql_languages" was reindexed
NOTICE: table "sql_languages" was reindexed
NOTICE: table "sql_packages" was reindexed
NOTICE: table "sql_packages" was reindexed
NOTICE: table "sql_sizing" was reindexed
NOTICE: table "sql_sizing" was reindexed
NOTICE: table "sql_sizing_profiles" was reindexed
NOTICE: table "sql_sizing_profiles" was reindexed
NOTICE: table "pg_statistic" was reindexed
NOTICE: table "pg_statistic" was reindexed
NOTICE: table "pg_type" was reindexed
NOTICE: table "pg_type" was reindexed
NOTICE: table "pg_attribute" was reindexed
NOTICE: table "pg_attribute" was reindexed
NOTICE: table "pg_autovacuum" was reindexed
NOTICE: table "pg_autovacuum" was reindexed
NOTICE: table "pg_inherits" was reindexed
NOTICE: table "pg_inherits" was reindexed
NOTICE: table "pg_index" was reindexed
NOTICE: table "pg_index" was reindexed
NOTICE: table "pg_operator" was reindexed
NOTICE: table "pg_operator" was reindexed
NOTICE: table "pg_opclass" was reindexed
NOTICE: table "pg_opclass" was reindexed
NOTICE: table "pg_am" was reindexed
NOTICE: table "pg_am" was reindexed
NOTICE: table "pg_amop" was reindexed
NOTICE: table "pg_amop" was reindexed
NOTICE: table "pg_amproc" was reindexed
NOTICE: table "pg_amproc" was reindexed
NOTICE: table "pg_language" was reindexed
NOTICE: table "pg_language" was reindexed
NOTICE: table "pg_largeobject" was reindexed
NOTICE: table "pg_largeobject" was reindexed
NOTICE: table "pg_aggregate" was reindexed
NOTICE: table "pg_aggregate" was reindexed
NOTICE: table "pg_trigger" was reindexed
NOTICE: table "pg_trigger" was reindexed
NOTICE: table "pg_cast" was reindexed
NOTICE: table "pg_cast" was reindexed
NOTICE: table "pg_namespace" was reindexed
NOTICE: table "pg_namespace" was reindexed
NOTICE: table "pg_conversion" was reindexed
NOTICE: table "pg_conversion" was reindexed
NOTICE: table "pg_depend" was reindexed
NOTICE: table "pg_depend" was reindexed
NOTICE: table "tbl_kenyon" was reindexed
NOTICE: table "tbl_kenyon" was reindexed
NOTICE: table "test" was reindexed
NOTICE: table "test" was reindexed
NOTICE: table "pg_attrdef" was reindexed
NOTICE: table "pg_attrdef" was reindexed
NOTICE: table "pg_constraint" was reindexed
NOTICE: table "pg_constraint" was reindexed
NOTICE: table "pg_description" was reindexed
NOTICE: table "pg_description" was reindexed
NOTICE: table "pg_proc" was reindexed
NOTICE: table "pg_proc" was reindexed
NOTICE: table "pg_rewrite" was reindexed
NOTICE: table "pg_rewrite" was reindexed
REINDEX
postgres=# reindex database postgres; -->重建postgres数据库下所有的索引
NOTICE: table "pg_class" was reindexed
NOTICE: table "sql_features" was reindexed
NOTICE: table "sql_implementation_info" was reindexed
NOTICE: table "sql_languages" was reindexed
NOTICE: table "sql_packages" was reindexed
NOTICE: table "sql_sizing" was reindexed
NOTICE: table "sql_sizing_profiles" was reindexed
NOTICE: table "pg_statistic" was reindexed
NOTICE: table "pg_autovacuum" was reindexed
NOTICE: table "pg_inherits" was reindexed
NOTICE: table "pg_operator" was reindexed
NOTICE: table "pg_opclass" was reindexed
NOTICE: table "pg_am" was reindexed
NOTICE: table "pg_amop" was reindexed
NOTICE: table "pg_amproc" was reindexed
NOTICE: table "pg_language" was reindexed
NOTICE: table "pg_largeobject" was reindexed
NOTICE: table "pg_aggregate" was reindexed
NOTICE: table "pg_trigger" was reindexed
NOTICE: table "pg_cast" was reindexed
NOTICE: table "pg_namespace" was reindexed
NOTICE: table "pg_conversion" was reindexed
NOTICE: table "tbl_kenyon" was reindexed
NOTICE: table "test" was reindexed
NOTICE: table "pg_attrdef" was reindexed
NOTICE: table "pg_constraint" was reindexed
NOTICE: table "pg_description" was reindexed
NOTICE: table "pg_proc" was reindexed
NOTICE: table "pg_rewrite" was reindexed
NOTICE: table "pg_type" was reindexed
NOTICE: table "pg_attribute" was reindexed
NOTICE: table "pg_index" was reindexed
NOTICE: table "pg_depend" was reindexed
REINDEX
version
------------------------------------------------------------------------------------------------------------------------
PostgreSQL 8.1.22 on x86_64-unknown-linux-gnu, compiled by GCC gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
(1 row)
注意:reindex 会造成全表锁。
REINDEX
postgres=# reindex table test; -->重建和表test有关的索引
REINDEX
postgres@linux-o8rc:~> reindexdb postgres -->重建postgres数据库下所有的索引
NOTICE: table "pg_class" was reindexed
NOTICE: table "pg_class" was reindexed
NOTICE: table "sql_features" was reindexed
NOTICE: table "sql_features" was reindexed
NOTICE: table "sql_implementation_info" was reindexed
NOTICE: table "sql_implementation_info" was reindexed
NOTICE: table "sql_languages" was reindexed
NOTICE: table "sql_languages" was reindexed
NOTICE: table "sql_packages" was reindexed
NOTICE: table "sql_packages" was reindexed
NOTICE: table "sql_sizing" was reindexed
NOTICE: table "sql_sizing" was reindexed
NOTICE: table "sql_sizing_profiles" was reindexed
NOTICE: table "sql_sizing_profiles" was reindexed
NOTICE: table "pg_statistic" was reindexed
NOTICE: table "pg_statistic" was reindexed
NOTICE: table "pg_type" was reindexed
NOTICE: table "pg_type" was reindexed
NOTICE: table "pg_attribute" was reindexed
NOTICE: table "pg_attribute" was reindexed
NOTICE: table "pg_autovacuum" was reindexed
NOTICE: table "pg_autovacuum" was reindexed
NOTICE: table "pg_inherits" was reindexed
NOTICE: table "pg_inherits" was reindexed
NOTICE: table "pg_index" was reindexed
NOTICE: table "pg_index" was reindexed
NOTICE: table "pg_operator" was reindexed
NOTICE: table "pg_operator" was reindexed
NOTICE: table "pg_opclass" was reindexed
NOTICE: table "pg_opclass" was reindexed
NOTICE: table "pg_am" was reindexed
NOTICE: table "pg_am" was reindexed
NOTICE: table "pg_amop" was reindexed
NOTICE: table "pg_amop" was reindexed
NOTICE: table "pg_amproc" was reindexed
NOTICE: table "pg_amproc" was reindexed
NOTICE: table "pg_language" was reindexed
NOTICE: table "pg_language" was reindexed
NOTICE: table "pg_largeobject" was reindexed
NOTICE: table "pg_largeobject" was reindexed
NOTICE: table "pg_aggregate" was reindexed
NOTICE: table "pg_aggregate" was reindexed
NOTICE: table "pg_trigger" was reindexed
NOTICE: table "pg_trigger" was reindexed
NOTICE: table "pg_cast" was reindexed
NOTICE: table "pg_cast" was reindexed
NOTICE: table "pg_namespace" was reindexed
NOTICE: table "pg_namespace" was reindexed
NOTICE: table "pg_conversion" was reindexed
NOTICE: table "pg_conversion" was reindexed
NOTICE: table "pg_depend" was reindexed
NOTICE: table "pg_depend" was reindexed
NOTICE: table "tbl_kenyon" was reindexed
NOTICE: table "tbl_kenyon" was reindexed
NOTICE: table "test" was reindexed
NOTICE: table "test" was reindexed
NOTICE: table "pg_attrdef" was reindexed
NOTICE: table "pg_attrdef" was reindexed
NOTICE: table "pg_constraint" was reindexed
NOTICE: table "pg_constraint" was reindexed
NOTICE: table "pg_description" was reindexed
NOTICE: table "pg_description" was reindexed
NOTICE: table "pg_proc" was reindexed
NOTICE: table "pg_proc" was reindexed
NOTICE: table "pg_rewrite" was reindexed
NOTICE: table "pg_rewrite" was reindexed
REINDEX
postgres=# reindex database postgres; -->重建postgres数据库下所有的索引
NOTICE: table "pg_class" was reindexed
NOTICE: table "sql_features" was reindexed
NOTICE: table "sql_implementation_info" was reindexed
NOTICE: table "sql_languages" was reindexed
NOTICE: table "sql_packages" was reindexed
NOTICE: table "sql_sizing" was reindexed
NOTICE: table "sql_sizing_profiles" was reindexed
NOTICE: table "pg_statistic" was reindexed
NOTICE: table "pg_autovacuum" was reindexed
NOTICE: table "pg_inherits" was reindexed
NOTICE: table "pg_operator" was reindexed
NOTICE: table "pg_opclass" was reindexed
NOTICE: table "pg_am" was reindexed
NOTICE: table "pg_amop" was reindexed
NOTICE: table "pg_amproc" was reindexed
NOTICE: table "pg_language" was reindexed
NOTICE: table "pg_largeobject" was reindexed
NOTICE: table "pg_aggregate" was reindexed
NOTICE: table "pg_trigger" was reindexed
NOTICE: table "pg_cast" was reindexed
NOTICE: table "pg_namespace" was reindexed
NOTICE: table "pg_conversion" was reindexed
NOTICE: table "tbl_kenyon" was reindexed
NOTICE: table "test" was reindexed
NOTICE: table "pg_attrdef" was reindexed
NOTICE: table "pg_constraint" was reindexed
NOTICE: table "pg_description" was reindexed
NOTICE: table "pg_proc" was reindexed
NOTICE: table "pg_rewrite" was reindexed
NOTICE: table "pg_type" was reindexed
NOTICE: table "pg_attribute" was reindexed
NOTICE: table "pg_index" was reindexed
NOTICE: table "pg_depend" was reindexed
REINDEX
阅读全文
0 0
- PG重建索引
- PG重建临时库
- 重建索引
- 索引重建
- 重建索引
- 索引重建
- 重建索引
- 重建索引
- 重建索引
- 重建索引
- 索引重建
- 重建索引
- 重建索引
- 合并索引和重建索引
- 索引损坏与重建索引
- 主键、外键、索引、重建索引
- 在线重建索引
- 批量自动重建索引
- Server Tomcat v7.0 Server at localhost failed to start
- 危桥僵尸问题的制度思考
- 安卓微信内,window.location.reload()不刷新问题
- MySQL5.7更改密码时出现ERROR 1054 (42S22): Unknown column 'password' in 'field list'
- shell脚本学习 之文件测试运算符
- PG重建索引
- [3].Spark 学习笔记 使用java ---explode
- Unity 、Eclipse Android平台、接入支付宝SDK
- redis(13)——哨兵原理
- Elasticsearch学习笔记(一)Elasticsearch安装
- Erlang函数递归调用模式
- 说说如何实现高可用的网站架构
- 模式开始-第二天
- angular ui-router,最适合的angular1的路由开发