![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
postgresql
文章平均质量分 69
鱼的思想
这个作者很懒,什么都没留下…
展开
-
全文索引创建
1 索引类型 Postgresql索引包括B-Tree索引,Hash索引,GIN(Generalized Inverted Index)索引。 B-Tree索引用于操作符 =, >。也可用于like pattern 'bar%'。'%bar' 不会使用索引。 Hash索引用于等值查询。使用范围很小,用处不大。 GIN索引一般用于全文索引。2 创建原创 2018-01-30 23:05:46 · 371 阅读 · 0 评论 -
Postgresql 索引分析
索引分析求出属于test02的所有test01的记录, 下面那种查询速度更快。表 create table test01(seq int, test01_id uuid primary key);create table test02(seq int, test02_id uuid primary key);create table test01_test02_map(seq原创 2018-01-14 09:59:28 · 861 阅读 · 0 评论 -
监控 I/O
1. 判断表示顺序扫描还是索引扫描select schemaname, relname,seq_scan, idx_scan, cast(idx_scan as numeric) /(idx_scan + seq_scan) as idx_scan_pctfrom pg_stat_user_tables where (idx_scan + seq_scan) > 0order by ...原创 2019-04-14 14:30:06 · 375 阅读 · 0 评论