public inbox for [email protected]
help / color / mirror / Atom feedFrom: bruno vieira da silva <[email protected]>
To: [email protected]
Subject: Query planning read a large amount of buffers for partitioned tables
Date: Wed, 15 Jan 2025 13:29:30 -0500
Message-ID: <CAB+Nuk9NAH8MxDK9ng9G+Vvs8XAaaV7Jc=F7FWrbF8U8WWaDEw@mail.gmail.com> (raw)
Hello All.
On pg 17 now we have better visibility on the I/O required during query
planning.
so, as part of an ongoing design work for table partitioning I was
analyzing the performance implications of having more or less partitions.
In one of my tests of a table with 200 partitions using explain showed a
large amount of buffers read during planning. around 12k buffers.
I observed that query planning seems to have a caching mechanism as
subsequent similar queries require only a fraction of buffers read during
query planning.
However, this "caching" seems to be per session as if I end the client
session and I reconnect the same query execution will require again to read
12k buffer for query planning.
Does pg have any mechanism to mitigate this issue ( new sessions need to
read a large amount of buffers for query planning) ? or should I mitigate
this issue by the use of connection pooling.
How is this caching done? Is there a way to have viability on its usage?
Where is it stored?
Thanks
--
Bruno Vieira da Silva
view thread (9+ messages) latest in thread
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Query planning read a large amount of buffers for partitioned tables
In-Reply-To: <CAB+Nuk9NAH8MxDK9ng9G+Vvs8XAaaV7Jc=F7FWrbF8U8WWaDEw@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox