We can tune query is that Query whether ping or not in s hared_buffers Shared_buffers The shared_buffers is simply an array of 8KB blocks.Each page has metadata within itself to distinguish itself as mentioned above. Before postgres checks out the data from the disk, it first does a lookup for the pages in the shared_buffers, if there is a hit then it returns the data from there itself and thereby avoiding a disk I/O. This Query can even tell how much data blocks came from disk and how much came from shared_buffers i.e memory. A query plan below gives an example, performance_test=# explain (analyze,buffers) select * from users order by userid limit 10; Limit (cost=0.42..1.93 rows=10 width=219) (actual time=32.099..81.529 rows=10 loops=1) Buffers: shared read=13 -> Index Scan using users_userid_idx on users (cost=0.42..150979.46 rows=1000000 width=219) (actual time=32.096..81.513 rows=10 loops=1) Buffers: shared read=13 Planning time: 0...