Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9D071B5D80A for ; Thu, 18 Aug 2011 05:52:11 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 27167-01 for ; Thu, 18 Aug 2011 08:52:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from elizabeth.gransy.com (elizabeth.gransy.com [89.187.132.199]) by mail.postgresql.org (Postfix) with ESMTP id 490E3B5D803 for ; Thu, 18 Aug 2011 05:52:03 -0300 (ADT) Received: from sq.gransy.com (localhost [127.0.0.1]) by elizabeth.gransy.com (Postfix) with ESMTP id 7D1F515E42FB; Thu, 18 Aug 2011 10:52:01 +0200 (CEST) Received: from 85.162.188.6 (SquirrelMail authenticated user tv@fuzzy.cz) by sq.gransy.com with HTTP; Thu, 18 Aug 2011 10:52:01 +0200 Message-ID: <00868fd1b178f824dd94d3f17b021953.squirrel@sq.gransy.com> In-Reply-To: <1313620811606-4710245.post@n5.nabble.com> References: <1313620811606-4710245.post@n5.nabble.com> Date: Thu, 18 Aug 2011 10:52:01 +0200 Subject: Re: tunning strategy needed From: "Tomas Vondra" To: "hyelluas" Cc: pgsql-performance@postgresql.org User-Agent: SquirrelMail/1.4.21 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201108/224 X-Sequence-Number: 44671 On 18 Srpen 2011, 0:40, hyelluas wrote: > Should I start with replacing the sql with procedures? > > Should I start with replacing the views with the procedures to save time > on > recreating an execution plan and parsing? > > Should I start with tuning server parameters ? Yes, you should start by tuning the server as a whole. Did you just install the DB and restored your database? Have you tuned the config? Tell us what are the basic performance-related parameters, i.e. shared_buffers effective_cache_size checkpoint_segments checkpoint_completion_target work_mem maintainance_work_mem seq_page_cost random_page_cost and more information about the hardware and setup too (RAM, database size). There's a quite nice guide regarding general tuning: http://wiki.postgresql.org/wiki/Tuning_Your_PostgreSQL_Server Tomas