Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id E460F9FC087 for ; Tue, 30 Oct 2007 18:00:25 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 62538-05 for ; Tue, 30 Oct 2007 18:00:17 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by postgresql.org (Postfix) with ESMTP id 55AAD9FC060 for ; Tue, 30 Oct 2007 18:00:12 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id j3so197892ugf for ; Tue, 30 Oct 2007 14:00:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=zp5WlQo87GN9fy2mpwMreALjdIHwaIMzdUnczM8aAQQ=; b=hTpS/oyGZMKhIiimpwrvVTzKxFJ3nHfbmBv3WhlBqgtrV6CKQc9Itp0aBXbiJnzN2oJfi2hjWqJCbQzwiT5Nymw6ConVVbXDIFonHiFg8JAyvIZKmJltO4UCK4cG4WdZGQ73KxTLxll0H3ObI3i67cbQdkCBX9toDNhau8fVljo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=dS17j8SBKGXL1+LxRJrFYIAsLC8Zt5B+gr3dHkPsG0Um/uR2GN5QpNmUL3sKb1rkjj0AAkBREBoTaD9zFFtASdeQuTv/CSwC9nDfdpUT+9NARwfRv5tyb0qXd8Vz8TGqKdV3+7jYlCHAfTr1fNjwVv0vYNR6QMFjSQx1hurvWBs= Received: by 10.78.200.3 with SMTP id x3mr5592801huf.1193778010690; Tue, 30 Oct 2007 14:00:10 -0700 (PDT) Received: by 10.78.135.11 with HTTP; Tue, 30 Oct 2007 14:00:10 -0700 (PDT) Message-ID: <357fa7590710301400x3a05796dle6bae219a1a25fc@mail.gmail.com> Date: Tue, 30 Oct 2007 17:00:10 -0400 From: "Steven Flatt" To: "Pablo Alcaraz" Subject: Re: tables with 300+ partitions Cc: pgsql-performance@postgresql.org In-Reply-To: <47277341.7070704@laotraesquina.com.ar> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4923_28853647.1193778010668" References: <47277341.7070704@laotraesquina.com.ar> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/367 X-Sequence-Number: 27389 ------=_Part_4923_28853647.1193778010668 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 10/30/07, Pablo Alcaraz wrote: > > I did some testing. I created a 300 partitioned empty table. Then, I > inserted some rows on it and the perfomance was SLOW too. Is the problem with inserting to the partitioned table or selecting from it? It sounds like inserting is the problem in which case I ask: how are you redirecting inserts to the appropriate partition? If you're using rules, then insert performance will quickly degrade with number of partitions as *every* rule needs to be evaluated for *every* row inserted to the base table. Using a trigger which you can modify according to some schedule is much faster, or better yet, use some application-level logic to insert directly to the desired partition. Steve ------=_Part_4923_28853647.1193778010668 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
On 10/30/07, Pablo Alcaraz <pabloa@laotraesquina.com.ar> wrote:
I did some testing. I created a 300 partitioned empty table. Then, I
inserted some rows on it and the perfomance was SLOW too.
 
Is the problem with inserting to the partitioned table or selecting from it?  It sounds like inserting is the problem in which case I ask: how are you redirecting inserts to the appropriate partition?  If you're using rules, then insert performance will quickly degrade with number of partitions as *every* rule needs to be evaluated for *every* row inserted to the base table.  Using a trigger which you can modify according to some schedule is much faster, or better yet, use some application-level logic to insert directly to the desired partition.
 
Steve
 
------=_Part_4923_28853647.1193778010668--