Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPuj3-0002Qo-Hw for pgsql-admin@arkaria.postgresql.org; Wed, 10 Apr 2013 13:06:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UPuj3-0007lC-09 for pgsql-admin@arkaria.postgresql.org; Wed, 10 Apr 2013 13:06:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPuj1-0007kJ-IE for pgsql-admin@postgresql.org; Wed, 10 Apr 2013 13:06:07 +0000 Received: from mail-la0-x22e.google.com ([2a00:1450:4010:c03::22e]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UPuiv-0005DI-79 for pgsql-admin@postgresql.org; Wed, 10 Apr 2013 13:06:07 +0000 Received: by mail-la0-f46.google.com with SMTP id ea20so410035lab.33 for ; Wed, 10 Apr 2013 06:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type:content-transfer-encoding; bh=HkDc28lxU0YTsEQhm0xO1kLvBJgibhbob78+/W7aAXU=; b=QolDsyApQHFjmrANGSRx3ydHIYlezghtWb0kfUzZFKu37s663mjQrNghW3/vsDRa+6 sWLicXP5/TEyGkIrbysnLSmLHzPL1/NFCq/+nrIY7zHRqtTbyh3rYCbtHCQ7dkEl/D0/ LGdFO2OEMWjZQU1bilf2m4ruv5IZ9QssRaeGF9hVvzm/5FceWWnO3y3fg6RJ+UaYgsRH lfOL2cnJOaLJKOAKG9XO3yPedDfrodY8gKi0j1Ey5xcewTjk4EB7TYHU6WOXWPrdWiBb nDSBHyNhms7ilAknDpxSmhqFiNlE1QTaEfOOeCE7ioelLdc6/vjRqOZghnNjMuKLLeVT WeTQ== X-Received: by 10.112.59.68 with SMTP id x4mr1126285lbq.121.1365599160068; Wed, 10 Apr 2013 06:06:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.2.4 with HTTP; Wed, 10 Apr 2013 06:05:20 -0700 (PDT) In-Reply-To: <5165261E.4050207@hssnet.com> References: <5165261E.4050207@hssnet.com> From: Vedran Krivokuca Date: Wed, 10 Apr 2013 15:05:20 +0200 Message-ID: Subject: Re: Experience with large number of tables in single PostgreSQL instance To: pgsql-admin@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org On Wed, Apr 10, 2013 at 10:43 AM, Dale Betts wrote: > > I'd agree, certainly in my experiences. > > You need to ensure OS parameters such as the max open files (fs.file-max = if we're talking > Linux) is set appropriately. Baring in mind each user will have an open f= ile on each > underlying datafile for the databases they're connected to. Ok, to reply to myself and other interested parties, further insights are welcome! I've been digging today for information on this subject and: http://postgresql.1045698.n5.nabble.com/GENERAL-Maximum-number-of-tables-pe= r-database-and-slowness-td1853836.html Basically saying: any number of tables is acceptable (well in range of couple of tens of thousands we might end up with), but have in mind pg_catalog might seriously grow with such number of tables. Huge pg_catalog tends to slow down query planner. This thread is from 2005., but I doubt those fact changed substionally with time. I'll probably do some testing, but I can hardly replicate production volume of data. Seems that due to predictable nature of the queries we are running against this system we'll go with multiple databases, each containing up to couple thousand tables at most. Still weighting pros and cons of each approach. -- Pozdrav/Greetings, Vedran Krivoku=C4=87a Disclaimer: This message may contain information. --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin