Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHIi6-005lxz-D3 for pgsql-general@arkaria.postgresql.org; Wed, 12 Jun 2024 07:47:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sHIi2-00EUY2-52 for pgsql-general@arkaria.postgresql.org; Wed, 12 Jun 2024 07:47:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sHIi1-00EUXu-BI for pgsql-general@lists.postgresql.org; Wed, 12 Jun 2024 07:47:54 +0000 Received: from sonic312-21.consmr.mail.sg3.yahoo.com ([106.10.244.211]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sHIhy-001EaM-Rv for pgsql-general@postgresql.org; Wed, 12 Jun 2024 07:47:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1718178464; bh=J31Qsku368f4nhE30YTajDhfSt+289BaAmr6dGU9IFE=; h=Date:From:To:Subject:References:From:Subject:Reply-To; b=IydrZeJekm69yaWMAYin7gPCgFdQ/eTR115k6nuJ3JC84GmhZY3vg/aVEWUlzEYPGl1hViYBISrng9CsWMv36l3/W3UuelwBvyEbvAZQ27fHEBNjFoFDJEY+KTXiMTqLp3E2IAQ9waFrzlhZJtPBs/3K1l8UDxt0vtuBP748jdMI+ab7Tw6P1DCcrODmT9kw85CnGyIAsTARmkxiqNH6E+hg4bBZLtYwuJPg8qA8MoO3q5VjBxrLq+t9wiOaFMALaXYDopk5MdF9AeVJoBCKZBIK235swtbyF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KTKZuat7oWX5u9RI8u8G 0WjkBtYtl8qvEY5bupLY.tvayHuQD05vxzIqG573NrMegv9d5q8MISPhcM2AEuJZUyLwwCNxY9Sc 3KlKJybz_UP81Yo1Nj6YmaliqjwcRj5uCRFflsUQv7wFvb2UXJrhT.hU4vx7ekEaQapnIBM1RSYe rulBMewGlthnTxDBMTOSPyQKzCS5d9MomTE4efqMDaRN3uJJxsHyKgNdjIZJit9q0qLrUt4nmtbi 8IZwuqfwMRx2g7PPpxARPl0i0uCOEdc5twUxBorSCcZmK0JzbVPAGK7eGp7opT6ktJJTZ7TykZ0f 8djZgSqEYIjxPsJgsd8j5AdfQOtvaZbEzbqFJqPjV8naO9e80WAv.UcMt2JAZ2TU6ytlBBnMUgAy AZmPEWaDhnusVbnwG8YEY0JTWWEM.cg360juOQZKwn2gtjcP0XzkI.g0JywTPQ_ujmI3hwN46WaD guHgLNX.UOitbu176puEiVJ_oMIGM9.kFxy2INOq4WXfh6z7k6xMCHvhW_UOvtDU3jT1muiRwiGG rOqZ90V3m8_P.eTui9YBa4buIaWJ00V4XcUFmX1.BAPh3sHk0embxuOn57pVTQzwFWn.Bt1aRDhz MPlsz4N4abkiIyXycXRoU6rzqcK6NHWQjeyEZgUHci9KAYAJ30Zm0VjNTzeYK2k0yRRQyN.Fqj3R r0g-- X-Sonic-MF: X-Sonic-ID: 4c3fab5b-84c7-40d0-a50d-8816c375c333 Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.sg3.yahoo.com with HTTP; Wed, 12 Jun 2024 07:47:44 +0000 Date: Wed, 12 Jun 2024 07:47:43 +0000 (UTC) From: Chandy G To: "pgsql-general@postgresql.org" Message-ID: <1204595253.3110982.1718178463166@mail.yahoo.com> Subject: postgres table statistics MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3110981_559059046.1718178463165" References: <1204595253.3110982.1718178463166.ref@mail.yahoo.com> X-Mailer: WebService/1.1.22407 YMailNorrin Content-Length: 3596 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ------=_Part_3110981_559059046.1718178463165 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi,=20 =C2=A0 We have postgres 13.9 running with tables thats got billions of reco= rds of varying sizes. Eventhough pg jdbc driver=C2=A0 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 throu= gh.=C2=A0 this forces to reduce the fetch size (if were to operate at a fix= ed 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, tryi= ng to get this data by a query run against each table (for row size: max(le= ngth(t::text))) seem to be=C2=A0 quite time consuming too. Does postgres maintain metadata about tables for the following.1. row count= =20 2. max row size.=20 or is there some other pg metadata that can help get this data quicker. TIA. ------=_Part_3110981_559059046.1718178463165 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,
  We have postgres 13.9 running with tables thats got billi= ons 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 opera= te at a fixed Xmx setting of client jvm).

It get a bit tr= ickier when 100s of such tables exists with varying records sizes. trying t= o see if the fetch size can be set dynamically based on the row count and t= he 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  q= uite time consuming too.

Does postgres maintain metadata = about tables for the following.
1. row count
2. max row s= ize.

or is there some other pg metadata that can hel= p get this data quicker.

TIA.




------=_Part_3110981_559059046.1718178463165--