Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qEW5o-0007PY-AM for pgsql-general@arkaria.postgresql.org; Wed, 28 Jun 2023 14:24:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1qEW5m-0005GL-BB for pgsql-general@arkaria.postgresql.org; Wed, 28 Jun 2023 14:24:22 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qEW5l-0005GB-W8 for pgsql-general@lists.postgresql.org; Wed, 28 Jun 2023 14:24:22 +0000 Received: from cross.elm.relay.mailchannels.net ([23.83.212.46]) by makus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qEW5j-000vnx-61 for pgsql-general@lists.postgresql.org; Wed, 28 Jun 2023 14:24:20 +0000 X-Sender-Id: a2hosting|x-authuser|bench@silentmedia.com Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B02C3342444; Wed, 28 Jun 2023 14:24:16 +0000 (UTC) Received: from mi3-ss103.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 6A2A434137A; Wed, 28 Jun 2023 14:24:15 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1687962255; a=rsa-sha256; cv=none; b=8hN6Pc8DncmISSEPo56IZjmpf9jO5uojvaxQef7cB49hGg9TNI/KGSmAnTM2w7wt4ZdJe1 3Alf2tsTJf173JRciGWpkSQZW7fZAtr1mTMwtVBnF45GwJ18l00xo1eIH6MtesQ3+UKCl8 ghukDGH47c9u11pkn56xm1prjyFA3lzFu9/h/12fcR9rDEmL6D6aMNfk/M2491eMCgxzZX SOl6jX0rSns6Oc/g8W7hldFx6iIXFJfit1r10BxC5MK5ABoZI93wofGeMfFmSGXDVc985d na7doIhFNNwtPNGuSuZ86InGq+7CEh0eukwerSm540EKoN8rdVLSZljDj3K6HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1687962255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8TjSF7vYU6wx5rbqLGjOJMMl4q6J1CkHBFETMhI9nlA=; b=wa6YYeyER5eL8OBdwmLBrmrB32AqyQJtKVA/Rmk1F/7Kf9iKTaKwJlg0rbbGzPe14HBDMO mcpw7PgzFMGzo8ydQT+trjDqjF0eZhdGERs462XgNBm6PwKwIy332BCyu5SlGczrxec7j+ ek0ajXvLarn5lXCFaSFx4YHDKEt0v/cJrJxpjqRR9BJ6nCot8QbvC8Fne5p76EI4tke7uW +QshBlWjm+AX7P7pqM/7RHbU9aJd/q9oL4+HBuh6JFokrkSs9owqMWQ6H10gVZVqJYr/dp 1lUfKm897ymB5srSz21OJcqFQa1QsT+mPGqyuo1D0pYUl2ZHaH5WRWRAuWt8Ng== ARC-Authentication-Results: i=1; rspamd-9fcc56855-944xk; auth=pass smtp.auth=a2hosting smtp.mailfrom=bench@silentmedia.com X-Sender-Id: a2hosting|x-authuser|bench@silentmedia.com X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|bench@silentmedia.com X-MailChannels-Auth-Id: a2hosting X-Plucky-Unite: 693e596b51a3a6ac_1687962256452_245589469 X-MC-Loop-Signature: 1687962256452:2843917361 X-MC-Ingress-Time: 1687962256452 Received: from mi3-ss103.a2hosting.com (mi3-ss103.a2hosting.com [75.98.175.95]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.109.138.49 (trex/6.9.1); Wed, 28 Jun 2023 14:24:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=silentmedia.com; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:Cc:To:Subject:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=8TjSF7vYU6wx5rbqLGjOJMMl4q6J1CkHBFETMhI9nlA=; b=zynHsDOoflA++28PDAXEoZSlZS rkyo4v9IP4kz6BYK0mIskpTc8om037NeX4KkuKOccEx2P9K5kADMwgdPH8TsjBUo5NAYy3dMLby3s lSfzJ9D483brv/aQdxHccv+BsJT7K0Z20VQR0nvhUC3ODPE3IcBn0k8LZx5u7hQxf/6lPpUCBxeAB Vq4sqcK/G3hn/rHc2sN6Kii/NsRBVp7CsxzwicknDqjuIr0TXXUorQGPZiXAmnw6s4NS/9Q2LFHvO 5BLNp9iEnk6ZIg/acGZDvtzRV0SfIDeIMzR0zpUl39EeXPUM03YhLjcxCeGyXcTUTlZrwRTF1sGqA jae/Cy4w==; Received: from [97.113.93.39] (port=58948 helo=simplicity.local) by mi3-ss103.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1qEW5g-00GKKF-1N; Wed, 28 Jun 2023 10:24:14 -0400 Subject: Re: typical active table count? To: Jeremy Schneider Cc: pgsql-general References: <0cc7b26e-3766-50c9-6212-4e2ed281b822@silentmedia.com> From: Ben Chobot Message-ID: Date: Wed, 28 Jun 2023 07:24:12 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:52.0) Gecko/20100101 PostboxApp/7.0.60 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------086F8AC6EE570F9AF5E057B4" Content-Language: en-US X-AuthUser: bench@silentmedia.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------086F8AC6EE570F9AF5E057B4 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit 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. --------------086F8AC6EE570F9AF5E057B4 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
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.
--------------086F8AC6EE570F9AF5E057B4--