Re: clear cache in postgresql

2021-06-16 Thread Peter J. Holzer
On 2021-06-16 14:39:19 +0800, Julien Rouhaud wrote: > On Wed, Jun 16, 2021 at 12:02:52PM +0530, Atul Kumar wrote: > > Sometimes I run a Postgres query it takes 30 seconds. Then, I > > immediately run the same query and it takes 2 seconds. [...] > > Can I force all caches to be cleared for tuning pu

Re: clear cache in postgresql

2021-06-15 Thread Vijaykumar Jain
On Wed, 16 Jun 2021 at 12:09, Julien Rouhaud wrote: > > On Wed, Jun 16, 2021 at 12:02:52PM +0530, Atul Kumar wrote: > > > > 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

Re: clear cache in postgresql

2021-06-15 Thread Julien Rouhaud
On Wed, Jun 16, 2021 at 12:02:52PM +0530, Atul Kumar wrote: > > 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? You can use p