开发者社区 问答 正文

select count(*) from table_name;有办法让这个查询走索引么?

select count(*) from table_name;有办法让这个查询走索引么?

本问题来自云栖社区【PostgreSQL技术进阶社群】。https://yq.aliyun.com/articles/690084 点击链接欢迎加入社区大社群。

展开
收起
游客886 2019-04-25 17:12:16 2136 分享 版权
1 条回答
写回答
取消 提交回答
  • index only scan
    你的这个查询建议直接查pg_stat_all_tables.n_live_tup
    速度最快

    2019-07-17 23:34:15
    赞同 展开评论