赞
踩
1、创建物化视图
- --视图hnqyhxv_person
- CREATE MATERIALIZED VIEW hnqyhxv_person TABLESPACE sys_default as
- SELECT
- *
- FROM E_PRI_PERSON WHERE LEREPSIGN = '1'
2、创建视图索引
- --创建索引
- CREATE INDEX index_hnqyhxv_person_pripid ON hnqyhxv_person(pripid);
3、查看索引
select * from pg_indexes where tablename = 'hnqyhxv_person'
4、刷新物化视图(会锁住视图,刷新较快)
refresh materialized view hnqyhxv_person;
5、刷新物化视图(不会锁住视图,刷新速度大幅下降)
refresh materialized view concurrently hnqyhxv_person;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。