Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eANN99A16735 for ; Thu, 23 Nov 2000 18:09:09 -0500 (EST) (envelope-from pgsql-admin-owner@postgresql.org) Received: from int-mail.syd.fl.net.au (int-mail.syd.fl.net.au [202.181.0.28]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eANLLuA31171 for ; Thu, 23 Nov 2000 16:21:57 -0500 (EST) (envelope-from andrew@modulus.org) Received: from Avon (avon.snowville.fl.net.au [202.181.1.250]) by int-mail.syd.fl.net.au (Postfix) with SMTP for id 21C611685E; Fri, 24 Nov 2000 08:22:00 +1100 (EST) Reply-To: From: "Andrew Snow" To: Subject: RE: Lack of Performance Date: Fri, 24 Nov 2000 08:21:49 +1100 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.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 In-Reply-To: Importance: Normal X-Archive-Number: 200011/155 X-Sequence-Number: 164 > What I dont understand about it, is that the DB is not THAT big. > The tables > are arround 10.000-30.000 rows and there are only about 6 tables. They all > use indexes where needed and everything is vacuumed up to 8 times > a day. But > the load is not affected by it. I can't seem to find "what" is > pressing the > db. > Does query optimization help a lot or does it only affect the > performance in a little manner? I think you need to be looking at your queries to see if one or more of them is causing the performance problem. Look at all the EXPLAIN output for each query, and also be aware that certain operations are always going to be slow, eg. a function call for every row of a large table, or using the builtin regular expression operators I found to be VERY slow. Perhaps post more details here to the list in case anyone can spot anything. Do some tests and find which query takes the longest. Find out if it is actually postgresql that is using all the CPU time. Include details of what versions of PostgreSQL and operating system you are using as well as hardware configuration. - Andrew