Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 1F7BA1EB83EA for ; Thu, 23 Feb 2012 15:07:11 -0400 (AST) Received: from li339-205.members.linode.com ([96.126.114.205] helo=squeakycode.net) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S0e0T-0002i5-Gz for pgsql-performance@postgresql.org; Thu, 23 Feb 2012 19:07:09 +0000 Received: from [192.168.10.84] (97-64-237-59.client.mchsi.com [97.64.237.59]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: andy) by squeakycode.net (Postfix) with ESMTPSA id 4932717A94; Thu, 23 Feb 2012 14:06:56 -0500 (EST) Message-ID: <4F468E5B.2070009@squeakycode.net> Date: Thu, 23 Feb 2012 13:07:07 -0600 From: Andy Colson User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Alessandro Gagliardi CC: Steve Crawford , Thom Brown , pgsql-performance@postgresql.org Subject: Re: set autovacuum=off References: <4F4658CB.3030505@squeakycode.net> <4F467EDF.5090708@pinpointresearch.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/180 X-Sequence-Number: 46352 On 2/23/2012 12:38 PM, Alessandro Gagliardi wrote: > Does analyze increase the efficiency of inserts or just selects? (I > assumed the latter.) Obviously, I will need to analyze sometimes, but That depends on if you have triggers that are doing selects. But in general you are correct, analyze wont help inserts. checkpoint_segments can help insert speed, what do you have that set to? Also how you insert can make things faster too. (insert vs prepared vs COPY) Also, if you have too many indexes on a table that can cause things to slow down. Your IO layer needs to be fast too. Have you watched vmstat and iostat? Have you read up on synchronous_commit? -Andy