public inbox for [email protected]  
help / color / mirror / Atom feed
From: Chandy G <[email protected]>
To: [email protected] <[email protected]>
Subject: postgres table statistics
Date: Wed, 12 Jun 2024 07:47:43 +0000 (UTC)
Message-ID: <[email protected]> (raw)
References: <[email protected]>

Hi, 
  We have postgres 13.9 running with tables thats got billions of records of varying sizes. Eventhough pg jdbc driver  provides a way to set fetch size to tune the driver to achieve better throughput, the JVM fails at the driver level when records of large size (say 200mb each) flows through.  this forces to reduce the fetch size (if were to operate at a fixed Xmx setting of client jvm).
It get a bit trickier when 100s of such tables exists with varying records sizes. trying to see if the fetch size can be set dynamically based on the row count and the record size distribution for a table. Unfortunately, trying to get this data by a query run against each table (for row size: max(length(t::text))) seem to be  quite time consuming too.
Does postgres maintain metadata about tables for the following.1. row count 
2. max row size. 

or is there some other pg metadata that can help get this data quicker.
TIA.





view thread (3+ 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]
  Subject: Re: postgres table statistics
  In-Reply-To: <[email protected]>

* 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