Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 74A32650185 for ; Wed, 3 Sep 2008 13:44:52 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80696-03-2 for ; Wed, 3 Sep 2008 13:44:44 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.231]) by postgresql.org (Postfix) with ESMTP id A55586501F5 for ; Wed, 3 Sep 2008 13:43:47 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id b25so3978331rvf.43 for ; Wed, 03 Sep 2008 09:43:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=IYRhRAzCTB/MQ4R5zL87ioGea7I/Vql6n/r+yFEJ53s=; b=Um9ofHDzDyEUi3nFrv+7c3e9trI2rSDqgs13s92M3QQM+DopDDKEEW/VUd1vMjg19N N1C91S0I708qC3IPA7j3FqcETMqcjUtxbLzAaqGH6NMdWEh13jQVbT2ZuwaGG5tBHUBQ U8FIigiJsA01MzPBiDoMxmMYTQ8jJcOjDH6bk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=GDq5XbXRAEZBdpSbFIN4rUvOhbd+DC84Gx4eSTWQBuC2JDzpaDHMfEbzsOrjQChsgK 8MjAlykfwl9G8EBwzBOZ1e9BeDob3Gl8+cScUurOZCL6bLuzS8cx1i1Ew4rMwDexg8yq ZKGSdZn+CtMuENkagXgoHWpy2TjTv6N+nPmeE= Received: by 10.141.29.8 with SMTP id g8mr5060883rvj.62.1220460226455; Wed, 03 Sep 2008 09:43:46 -0700 (PDT) Received: by 10.140.248.12 with HTTP; Wed, 3 Sep 2008 09:43:46 -0700 (PDT) Message-ID: Date: Wed, 3 Sep 2008 10:43:46 -0600 From: "Scott Marlowe" To: s.caillet@free.fr Subject: Re: Partitions number limitation ? Cc: pgsql-performance@postgresql.org In-Reply-To: <1220436022.48be603606137@imp.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1220436022.48be603606137@imp.free.fr> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.41 tagged_above=0 required=5 tests=SUBJECT_FUZZY_TION=0.41 X-Spam-Level: X-Archive-Number: 200809/47 X-Sequence-Number: 31360 On Wed, Sep 3, 2008 at 4:00 AM, wrote: > Hi ! > > To improve our software insert datas performance, we have decided to use > partition architecture in our database. It works well for the following volume : > 45 main tables and 288 inherited daughter tables for each, that is a total of > 12960 partitions. > > I have some trouble now with another customer's database with the following > volume : 87 main tables and 288 tables for each, that is 25056 partitions. > > Is there some kind of limit in postgresql about the number of partitions ? Do > you know some tuning in the conf files to improve postgresql management of so > many tables ? I have already used different tablespaces, one for each main table > and its 288 partitions. What do you mean PostgreSQL management of the partitions. Triggers, rules, application based partitioning? Rules aren't fast enough with this many partitions and if you can easily add partitioning in your application and write directly to the right child table it might be much faster. The size of your disk array depends very much on how quickly you'll be saturating your CPUS, either in the app layer or CPU layer to maintain your partitioning. If an app needs to insert 100,000 rows into ONE partition, and it knows which one, it's likely to be way faster to have the app do it instead of pgsql. The app has to think once, the database 100,000 times.