X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 92EF0D1B8B0 for ; Wed, 3 Sep 2003 14:12:26 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 01108-09 for ; Wed, 3 Sep 2003 11:11:59 -0300 (ADT) Received: from shire.ontko.com (shire.ontko.com [199.164.165.1]) by svr1.postgresql.org (Postfix) with ESMTP id 24F75D1B8B1 for ; Wed, 3 Sep 2003 11:11:55 -0300 (ADT) Received: from nick (bilbo.ontko.com [199.164.165.101]) by shire.ontko.com (8.12.3/8.12.3/Debian-6.4) with SMTP id h83EBv0Q004920; Wed, 3 Sep 2003 09:11:59 -0500 Reply-To: From: "Nick Fankhauser" To: "Azlin Ghazali" , Subject: Re: PostgreSQL is slow...HELP Date: Wed, 3 Sep 2003 09:10:59 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <20030903130857.5986.qmail@web40401.mail.yahoo.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/19 X-Sequence-Number: 3385 > For small records > it is not much problems. But as the records grew (up to 12,000 > records) the > difference is quite significant. Although there are many tuning options, I'd suggest starting by making sure you have an index (unique in cases where appropriate) on accposd.date accposd.item, items.name, accposd.loose and items.name. Then do an "analyze;" on the DB to make sure the database takes advantage of the indexes where appropriate. If this doesn't help, there are other options to pursue, but this is where I would start. -Nick