Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id BA0DD6335E7 for ; Sat, 9 Jan 2010 06:37:46 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 04415-09 for ; Sat, 9 Jan 2010 10:37:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relay1.mail.masterhost.ru (relay1.mail.masterhost.ru [83.222.23.61]) by mail.postgresql.org (Postfix) with ESMTP id 51AFD6335A4 for ; Sat, 9 Jan 2010 06:37:46 -0400 (AST) Received: from [UNAVAILABLE] ([80.252.153.64] helo=[192.168.1.3]) by relay1.mail.masterhost.ru with esmtp envelope from authenticated with postmaster@zhukcity.ru message id 1NTYV1-0009Pi-57 for pgsql-performance@postgresql.org; Sat, 09 Jan 2010 13:24:51 +0300 Message-ID: <4B485975.70506@zhukcity.ru> Date: Sat, 09 Jan 2010 13:24:53 +0300 From: Nickolay User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: PG optimization question Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SpamTest-Envelope-From: nitro@zhukcity.ru X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 11577 [Jan 09 2010] X-SpamTest-Info: {relay has no DNS name} X-SpamTest-Method: none X-SpamTest-Rate: 40 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0284], KAS30/Release X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.589 tagged_above=-10 required=5 tests=BAYES_00=-2.599, FH_DATE_PAST_20XX=3.188 X-Spam-Level: X-Archive-Number: 201001/158 X-Sequence-Number: 37038 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). 1. What would be your recommendations on how to partition this table (by months, years or quarters)? 2. What is recommended PG settings for such configuration? Would it be ok to set shared_buffers to let's say 512M (if RAM is 1Gig may be shared_buffers is to be 400M?)? What other settings would you recommend? Thanks in advance, Nick.