pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jimmy <mpokky@126.com>
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: how to know that one query use the data in the os cache
Date: Thu, 27 Sep 2018 13:39:14 +0800 (CST)
Message-ID: <3a3514b8.6509.1661989d390.Coremail.mpokky@126.com> (raw)

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.

Message-ID: <3a3514b8.6509.1661989d390.Coremail.mpokky@126.com>
Permalink:  ../3a3514b8.6509.1661989d390.Coremail.mpokky@126.com/
Also on:    postgresql.org/message-id/3a3514b8.6509.1661989d390.Coremail.mpokky@126.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mpokky@126.com
  Subject: Re: how to know that one query use the data in the os cache
  In-Reply-To: <3a3514b8.6509.1661989d390.Coremail.mpokky@126.com>
  References: <3a3514b8.6509.1661989d390.Coremail.mpokky@126.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox