X-Original-To: pgsql-bugs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 00FBE528BB for ; Fri, 3 Jun 2005 04:09:04 -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 59949-05 for ; Fri, 3 Jun 2005 07:09:01 +0000 (GMT) Received: from web50805.mail.yahoo.com (web50805.mail.yahoo.com [206.190.38.114]) by svr1.postgresql.org (Postfix) with SMTP id 72132528A8 for ; Fri, 3 Jun 2005 04:08:59 -0300 (ADT) Received: (qmail 62048 invoked by uid 60001); 3 Jun 2005 07:09:00 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=zWW389gXjecBw+2YZX8Us5l3ceqljEyg3pWwPB6YgbKiiYALI3Xfn74TL/qWq/JbYVGDtwxpzFbPjG5u9WW7OZKdl973K5LglUF2lUnHSUoVvChCgmgk/Gp5OCCHhH9z8R6MFz2uUvqFNac/lLB43tKQ+WGPcze5gR9gaGtPzSQ= ; Message-ID: <20050603070900.62046.qmail@web50805.mail.yahoo.com> Received: from [195.33.105.17] by web50805.mail.yahoo.com via HTTP; Fri, 03 Jun 2005 00:09:00 PDT Date: Fri, 3 Jun 2005 00:09:00 -0700 (PDT) From: Bahadur Singh Subject: Re: BUG #1697: Select getting slower on continously updating data To: Bruno Wolff III Cc: pgsql-bugs@postgresql.org, pgsql-novice@postgresql.org, pgsql-performance@postgresql.org In-Reply-To: <20050602130259.GB9716@wolff.to> 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.969 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST X-Spam-Level: X-Archive-Number: 200506/25 X-Sequence-Number: 11984 --- Bruno Wolff III wrote: > This does not belong on the pgsql-bugs list. The > pgsql-novice or > pgsql-performance lists seem more appropiate. I have > set followups > to the pgsql-novice list. > > On Thu, Jun 02, 2005 at 12:05:00 +0100, > Bahadur Singh wrote: > > > > Hello, > > > > I found situtation that, when I am selecting data > from a table of 200 > > records, getting slower as I do continous update > to the same existing data. > > You need to be vacuuming (and possibly analyzing) > the table more often as the > updates will leave dead rows in the table which will > bloat the table size and > slow down access, particularly sequential scans. If > the updates modify the > data value distributions significantly, then you > will also need to > reanalyze the table to help the planner make good > decisions. > Many thanks for this tip ! But is this good idea to analyse/vacuuming the database tables while updates are taking place.. Since, I update continuously say (100,000 ) times or more the same data set. This is the result of analyze command. INFO: analyzing "public.salesarticle" INFO: "salesarticle": scanned 3000 of 20850 pages, containing 62 live rows and 134938 dead rows; 62 rows in sample, 431 estimated total rows Gesamtlaufzeit der Abfrage: 5531 ms. Total Time Taken : 5531 ms. Can you suggest me some clever way to so, because I would prefer to do vaccumming while database is not loaded with queries/transactions. Regards Bahadur __________________________________ Discover Yahoo! Find restaurants, movies, travel and more fun for the weekend. Check it out! http://discover.yahoo.com/weekend.html