pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ben Chobot <bench@silentmedia.com>
To: Jeremy Schneider <schneider@ardentperf.com>
Cc: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: typical active table count?
Date: Wed, 28 Jun 2023 07:24:12 -0700
Message-ID: <a40cdd17-5875-5954-6fb7-adfa4a879ed9@silentmedia.com> (raw)
In-Reply-To: <d9095fde-ad79-76f9-5030-f2195aee34ed@ardentperf.com>
References: <CA+fnDAbDN0sMTVnCrKAMuu65dyHhqXqp+hKKoO83V6LA-Bos+A@mail.gmail.com>
	<0cc7b26e-3766-50c9-6212-4e2ed281b822@silentmedia.com>
	<d9095fde-ad79-76f9-5030-f2195aee34ed@ardentperf.com>

Jeremy Schneider wrote on 6/27/23 11:47 AM:
> Thank Ben, not a concern but I'm trying to better understand how common
> this might be. And I think sharing general statistics about how people
> use PostgreSQL is a great help to the developers who build and maintain it.
>
> One really nice thing about PostgreSQL is that two quick copies of
> pg_stat_all_tables and you can easily see this sort of info.
>
> If you have a database where more than 100 tables are updated within a
> 10 second period - this seems really uncommon to me - I'm very curious
> about the workload.

Well, in our case we have a SaaS model where a moderately complicated 
schema is replicated hundreds of times per db. It doesn't take much load 
to end up scattering writes across many tables (not to mention their 
indices). We do have table partitioning too, but it's a relatively small 
part of our schema and the partitioning is done by date, so we really 
only have one hot partition at a time. FWIW, most of our dbs have 32 cores.

All that aside, as others have said there are many reasonable ways to 
reach the threshold you have set.

view thread (8+ messages)

Message-ID: <a40cdd17-5875-5954-6fb7-adfa4a879ed9@silentmedia.com>
Permalink:  ../a40cdd17-5875-5954-6fb7-adfa4a879ed9@silentmedia.com/
Also on:    postgresql.org/message-id/a40cdd17-5875-5954-6fb7-adfa4a879ed9@silentmedia.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: bench@silentmedia.com, schneider@ardentperf.com
  Subject: Re: typical active table count?
  In-Reply-To: <a40cdd17-5875-5954-6fb7-adfa4a879ed9@silentmedia.com>
  References: <CA+fnDAbDN0sMTVnCrKAMuu65dyHhqXqp+hKKoO83V6LA-Bos+A@mail.gmail.com> <0cc7b26e-3766-50c9-6212-4e2ed281b822@silentmedia.com> <d9095fde-ad79-76f9-5030-f2195aee34ed@ardentperf.com> <a40cdd17-5875-5954-6fb7-adfa4a879ed9@silentmedia.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox