Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 40C862E0061 for ; Mon, 28 Apr 2008 14:28:20 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 00366-10 for ; Mon, 28 Apr 2008 14:28:12 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by developer.postgresql.org (Postfix) with ESMTP id BA00C2E005A for ; Mon, 28 Apr 2008 14:28:12 -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 m3SHSBgv010509 for ; Mon, 28 Apr 2008 14: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 m3SH43t4003739 for pgsql-performance@postgresql.org; Mon, 28 Apr 2008 14:04:03 -0300 (ADT) (envelope-from news) From: Chris Browne X-Newsgroups: pgsql.performance Subject: Re: Where do a novice do to make it run faster? Date: Mon, 28 Apr 2008 12:35:18 -0400 Organization: cbbrowne Computing Inc Lines: 37 Message-ID: <601w4q6ipl.fsf@dba2.int.libertyrms.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.21 (linux) Cancel-Lock: sha1:qr9ldhIlRGcbim63asTE0Lrr32c= To: pgsql-performance@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/404 X-Sequence-Number: 29897 gentosaker@gmail.com ("A B") writes: > 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 :-) In the order of ease of implementation, it tends to be... 1. Tweak postgresql.conf 2. Make sure you ran VACUUM + ANALYZE 3. Find some expensive queries and try to improve them, which might involve changing the queries and/or adding relevant indices 4. Add RAM to your server 5. Add disk to your server 6. Redesign your application's DB schema so that it is more performant by design URL below may have some material of value... -- select 'cbbrowne' || '@' || 'cbbrowne.com'; http://linuxfinances.info/info/postgresqlperformance.html It is usually a good idea to put a capacitor of a few microfarads across the output, as shown.