clear cache in postgresql

From: Atul Kumar <akumar14871(at)gmail(dot)com>
To: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: clear cache in postgresql
Date: 2021-06-16 06:32:52
Message-ID: CA+ONtZ75zZv+7ThMdiyFVAa7ZXBSv6NLAGgLqmzbrrjMU3Os8g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have an postgres 10 instance on RDS.

Sometimes I run a Postgres query it takes 30 seconds. Then, I
immediately run the same query and it takes 2 seconds. It appears that
Postgres has some sort of caching. Can I somehow see what that cache
is holding? Can I force all caches to be cleared for tuning purposes?

So I need to clear the cache without restarting/rebooting the postgres
server to check the correct execution plan of my query.

Please help me with your suggestions.

Regards.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Julien Rouhaud 2021-06-16 06:39:19 Re: clear cache in postgresql
Previous Message Atul Kumar 2021-06-16 06:28:56 Re: query issue