X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D7A1252A25 for ; Thu, 28 Jul 2005 12:18:17 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 81010-06 for ; Thu, 28 Jul 2005 15:18:15 +0000 (GMT) Received: from web53507.mail.yahoo.com (web53507.mail.yahoo.com [206.190.37.68]) by svr1.postgresql.org (Postfix) with SMTP id 72E4652A3C for ; Thu, 28 Jul 2005 12:18:14 -0300 (ADT) Received: (qmail 46699 invoked by uid 60001); 28 Jul 2005 15:18:13 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=v2s1hLhSCGTEspFeaJHbUwlZW092CKAWazwy7eLncUuUQcJPaq+O7BniIIYTqG0aIHowS7bX2G9aMCU+5zmV43YpPsq19nkmDo3CXqgNmgaiLxmXboH3ux2Oxg55RtsbpKlAVzfnEsoxFxrT8+HLqC/UmGDz6FRel9mkaEUng7Q= ; Message-ID: <20050728151813.46697.qmail@web53507.mail.yahoo.com> Received: from [209.87.238.132] by web53507.mail.yahoo.com via HTTP; Thu, 28 Jul 2005 08:18:13 PDT Date: Thu, 28 Jul 2005 08:18:13 -0700 (PDT) From: jing han Subject: about postgres performance issue To: postgres interface MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.924 tagged_above=0 required=5 tests=AWL, FROM_ENDS_IN_NUMS, FROM_HAS_ULINE_NUMS X-Spam-Level: X-Archive-Number: 200507/33 X-Sequence-Number: 5669 Hello, We have a database with around 20000 records. Most of the time we need to update records in two tables. These two tables have around 6000 records. When we update them, records in one of the table just get updated, some of the records in another table will be deleted and new records will be added. When we repeatedly update these two tables, (note: we execute "vacuum --analyze" every time after we update those two tables). we check our log file, the first time took 8 seconds, the second time took 9 seconds, the third time took 11 seconds, the fourth time took 15 seconds, the fifth time took 18 seconds, the sixth time took 22 seconds and so on. The time we use to update two tables increses. We check the database file directory, found database file size growed. Then we use "vacuum full", or use a script to do su -l postgres -c "pg_dump -Fc -f bigNetManDB netman; sleep 2; pg_restore -v --clean -d netman bigNetManDB" to try to bring down the database size. We still found that after we "vacuum full" database, the first time to update those two tables took 10 seconds, seconds time took 13 seconds and so on, which means we cannot get 8 seconds performance anymore. Can you give me any idea to deal with the database size growing problem? Any help will be greatly appreciated. jing __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com