Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 6DA3C9FB1CB for ; Mon, 25 Sep 2006 19:27:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 64397-08 for ; Mon, 25 Sep 2006 19:27:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 05AF19FA502 for ; Mon, 25 Sep 2006 19:27:30 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k8PMRQVK016133; Mon, 25 Sep 2006 18:27:26 -0400 (EDT) To: "Marc Morin" cc: "Markus Schaber" , pgsql-performance@postgresql.org Subject: Re: Decreasing BLKSZ In-reply-to: <2BCEB9A37A4D354AA276774EE13FB8C20113068D@mailserver.sandvine.com> References: <2BCEB9A37A4D354AA276774EE13FB8C20113068D@mailserver.sandvine.com> Comments: In-reply-to "Marc Morin" message dated "Mon, 25 Sep 2006 17:54:10 -0400" Date: Mon, 25 Sep 2006 18:27:26 -0400 Message-ID: <16132.1159223246@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.098 tagged_above=0 required=5 tests=AWL, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/333 X-Sequence-Number: 21019 "Marc Morin" writes: > No, an insert consists of roughly 10,000+ rows per transaction block. Perhaps it would help to pre-sort these rows by key? Like Markus, I'm pretty suspicious of lowering BLCKSZ ... you can try it but it's likely to prove counterproductive (more btree index levels, more rows requiring toasting, a tighter limit on what rows will fit at all). I doubt I'd try to make it lower than a couple K in any case. The bottom line here is likely to be "you need more RAM" :-( I wonder whether there is a way to use table partitioning to make the insert pattern more localized? We'd need to know a lot more about your insertion patterns to guess how, though. regards, tom lane