关于Postgres 8.4当你这样做:
select * from pg_stat_all_indexes where relname = 'table_name';它返回字段idx_tup_read和idx_tup_fetch,有什么区别?
发布于 2012-05-15 07:22:15
当查看视图的源代码时,您将看到idx_tup_read是调用pg_stat_get_tuples_returned()的结果,idx_tup_fetch是调用pg_stat_get_tuples_fetched()的结果
手册对这两个函数的描述如下:
pg_stat_get_tuples_returned(oid)参数为表时顺序扫描读取的行数;参数为索引时返回的索引条目数;参数为表时通过位图扫描获取的表行数;或在参数为索引时使用索引获取的表行数
发布于 2017-09-27 06:26:23
来自postgresql文档,
idx_tup_read is number of index entries returned by scans on this index
idx_tup_fetch is number of live table rows fetched by simple index scans using this index因此,reads是指索引返回所需行的位置,而fetches是索引返回表行本身的位置。
发布于 2017-08-02 10:17:03
官方文档页面说,它们之间的区别出现了:
在所有这些情况下,idx_tup_read都比idx_tup_fetch大。
https://dba.stackexchange.com/questions/17863
复制相似问题