dongyigua4468 2015-03-06 01:50
浏览 49

为什么我的带有多个线串的9400 kb PostGIS表只在heap_blks_read和heap_blks_hit中显示17kb和41kb?

This table serves GeoJSON data directly to an OpenLayers app via PHP (no GeoServer). I open the app in a browser and start panning, which requests hundreds of lines. One single pan can return 1000 kb linestring geojson according to firebug. But the heap_blks_read and heap_blks_hit never get much higher than 17kb and 41kb respectively. The query that I'm using to monitor the cache rate is below. I'm just wondering how the database is performing upon many repeated queries to my geometry table.

    CREATE OR REPLACE VIEW vw_hit_rate AS 
 SELECT pg_statio_user_tables.relname,
    pg_size_pretty(pg_statio_user_tables.heap_blks_read) AS read,
    pg_size_pretty(pg_statio_user_tables.heap_blks_hit) AS hit,
    round(pg_statio_user_tables.heap_blks_hit::numeric / (pg_statio_user_tables.heap_blks_hit + pg_statio_user_tables.heap_blks_read)::numeric, 3) AS round
   FROM pg_statio_user_tables
  WHERE pg_statio_user_tables.heap_blks_read > 0
  ORDER BY round(pg_statio_user_tables.heap_blks_hit::numeric / (pg_statio_user_tables.heap_blks_hit + pg_statio_user_tables.heap_blks_read)::numeric, 3)
 LIMIT 25;
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 基于卷积神经网络的声纹识别
    • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题