how to know that one query use the data in the os cache

From: jimmy <mpokky(at)126(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: how to know that one query use the data in the os cache
Date: 2018-09-27 05:39:14
Message-ID: 3a3514b8.6509.1661989d390.Coremail.mpokky@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I use postgresql for windows server 2012 R2.
I use select pg_prewarm('tablename','read','main'); to load data into the os cache.
How can I know the database used the data in the os cache when I use the sql, select * from tablename, to query.
explain(analyze true, buffers true) select * from tablename
This sql above just show that the data in the database cache are used by querying. Can not show the data in the os cache.
Because I am optimizing the query speed by loading data into the os cache.
but the speed of query is as the same as the speed before using pg_prewarm.
So I doubt the database do not use the data in the os cache when it is querying.
I want to pick up the speed of query by using os cache and database cache.

Browse pgsql-general by date

  From Date Subject
Next Message Christoph Moench-Tegeder 2018-09-27 06:30:39 Re: Out of Memory
Previous Message jimmy 2018-09-27 01:10:40 Re:Re: how to clean the cache from databases and operating system