From: Laurenz Albe <laurenz.albe@cybertec.at>
To: James(王旭) <wangxu@gu360.com>
To: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: How to gracefully keep my specific index in memory ?
Date: Mon, 12 Aug 2019 14:24:00 +0200
Message-ID: <27c1fc51f3372828740c45a97d2a76bbaf1f667c.camel@cybertec.at> (raw)
In-Reply-To: <tencent_5F1047874E05A0A3690A1BC9@qq.com>
References: <tencent_5F1047874E05A0A3690A1BC9@qq.com>
James(王旭) wrote:
> As the title,How to keep a specific index in memory gracefully?
>
> After some statistical query, I can determine that not all indexes can be fit into memory,
> but one of the most frequently used indexes(say idx_xyz) can be definitely fit into
> memory(specifically ,[the size of idx_xyz]=20% x [memory size]).
>
> I know there's pgprewarm, but I feel with pgprewarm I can't keep things under control, e.g. no realtime monitor, being squeezed out of memory ,.etc.
>
> Is it possible that I can simply do something like "select idx_xyz into xxx" and keep the specific index in memory forever?
If the indexes are frequently used, they should remain cached anyway.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
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: laurenz.albe@cybertec.at, wangxu@gu360.com
Subject: Re: How to gracefully keep my specific index in memory ?
In-Reply-To: <27c1fc51f3372828740c45a97d2a76bbaf1f667c.camel@cybertec.at>
References: <tencent_5F1047874E05A0A3690A1BC9@qq.com> <27c1fc51f3372828740c45a97d2a76bbaf1f667c.camel@cybertec.at>
* 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