how to know whether query data from memory after pg_prewarm

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 whether query data from memory after pg_prewarm
Date: 2018-09-19 01:34:31
Message-ID: 75890af2.262f.165ef76e5ef.Coremail.mpokky@126.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I use select pg_prewarm('table1','read','main') to load data of table1 into the memory.
when I use select count(1) from table1 group by aa to query data.
I find the speed of query is not fast, I wonder whether it query data from memory.
And it is slower than Oracle, both of Oracle and Postgresql has same table and count of data.
when pg_prewarm use 'read' mode, the data is put into the OS cache, how to examine the table which is pg_prewarmed into the OS cache .
I know pg_buffercache ,but it just examine the table in the shared buffer of Postgresql, not the table in the OS cache.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message jimmy 2018-09-19 01:53:28 Why the sql is not executed in parallel mode
Previous Message Julian Paul 2018-09-19 01:24:29 Re: Code of Conduct