Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 2CC942E002D for ; Mon, 28 Apr 2008 13:28:21 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 89856-04 for ; Mon, 28 Apr 2008 13:28:10 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by developer.postgresql.org (Postfix) with ESMTP id D04262E0043 for ; Mon, 28 Apr 2008 13:28:11 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.1/8.14.1) with ESMTP id m3SGSBOY093479 for ; Mon, 28 Apr 2008 13:28:11 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.1/8.14.1/Submit) id m3SGAZT0088145 for pgsql-performance@postgresql.org; Mon, 28 Apr 2008 13:10:35 -0300 (ADT) (envelope-from news) From: Dennis Muhlestein X-Newsgroups: pgsql.performance Subject: Re: Where do a novice do to make it run faster? Date: Mon, 28 Apr 2008 10:10:35 -0600 Organization: Hub.Org Networking Services Lines: 32 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Thunderbird 2.0.0.12 (X11/20080318) In-Reply-To: To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=AWL=0.000 X-Spam-Level: X-Archive-Number: 200804/402 X-Sequence-Number: 29895 A B wrote: > So, it is time to improve performance, it is running to slow. > AFAIK (as a novice) there are a few general areas: > > 1) hardware > 2) rewriting my queries and table structures > 3) using more predefined queries > 4) tweek parameters in the db conf files > > Of these points: > 1) is nothing I can do about right now, but in the future perhaps. > 2) will be quite hard right now since there is more code than time. > 3) almost like 2 but perhaps more do-able with the current constraints. > 4) This seems to be the easiest one to start with... > > So what should I do/read concerning point 4? > If you have other good suggestions I'd be very interested in that. > > Thank you :-) > 1st, change your log settings log_min_duration_statement to something like 1000 (one second). This will allow you to see which statements take the longest. 2nd. Use EXPLAIN ANALYZE on those statements to determine what is taking a long time and focus on optimizing those statements that take the longest to execute. That ought to get you a long way down the road. -Dennis