Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id D6A38632C70 for ; Sat, 9 Jan 2010 21:24:48 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 03374-02 for ; Sun, 10 Jan 2010 01:24:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by mail.postgresql.org (Postfix) with ESMTP id 1399B632B82 for ; Sat, 9 Jan 2010 21:24:38 -0400 (AST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 198761E043A; Sun, 10 Jan 2010 09:24:33 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 80TA7NKVMzYj; Sun, 10 Jan 2010 09:24:31 +0800 (WST) Received: from [10.1.1.6] (124-169-133-89.dyn.iinet.net.au [124.169.133.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id 191111E0439; Sun, 10 Jan 2010 09:24:30 +0800 (WST) Message-ID: <4B492C4A.2000403@postnewspapers.com.au> Date: Sun, 10 Jan 2010 09:24:26 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: Nickolay CC: pgsql-performance@postgresql.org Subject: Re: PG optimization question References: <4B485B47.1000205@zhukcity.ru> In-Reply-To: <4B485B47.1000205@zhukcity.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.24 tagged_above=-10 required=5 tests=AWL=0.359, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/172 X-Sequence-Number: 37052 On 9/01/2010 6:32 PM, Nickolay wrote: > Hi 2 all, > > Here is my typical configuration: 1(2) GB of RAM, HP ML 350(150) series > server, SATA raid, Linux. > > I have 1 big table (called "archive") which contains short text messages > with a plenty of additional service info. > Currently this table contains more than 4M rows for a period of 4,5 > months, i.e. each row has average size of 1K. > > I'm going to make our application work with partitions of this table > instead of one large table. The primary reason is that eventually we'd > need to remove old rows and it would be pretty hard with one table > because of blocking (and rows are being added constantly). DELETEs shouldn't block concurrent INSERTs. That said, dropping a partition is a lot more convenient than DELETEing from a big table. -- Craig Ringer