X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id E86909DD6FA for ; Mon, 12 Dec 2005 14:50:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24608-02 for ; Mon, 12 Dec 2005 14:50:21 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from tigger.fuhr.org (tigger.fuhr.org [63.214.45.158]) by postgresql.org (Postfix) with ESMTP id 150619DD607 for ; Mon, 12 Dec 2005 14:50:18 -0400 (AST) Received: from winnie.fuhr.org (winnie.fuhr.org [10.1.0.1]) by tigger.fuhr.org (8.13.3/8.13.3) with ESMTP id jBCIoGww084426 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Dec 2005 11:50:19 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: from winnie.fuhr.org (localhost [127.0.0.1]) by winnie.fuhr.org (8.13.4/8.13.4) with ESMTP id jBCIoGQ1060622; Mon, 12 Dec 2005 11:50:16 -0700 (MST) (envelope-from mfuhr@winnie.fuhr.org) Received: (from mfuhr@localhost) by winnie.fuhr.org (8.13.4/8.13.4/Submit) id jBCIoGsW060621; Mon, 12 Dec 2005 11:50:16 -0700 (MST) (envelope-from mfuhr) Date: Mon, 12 Dec 2005 11:50:16 -0700 From: Michael Fuhr To: Merlin Moncure Cc: pgsql-performance@postgresql.org, Carlos Benkendorf Subject: Re: How much expensive are row level statistics? Message-ID: <20051212185016.GA60523@winnie.fuhr.org> References: <6EE64EF3AB31D5448D0007DD34EEB3417DDAC9@Herge.rcsinc.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6EE64EF3AB31D5448D0007DD34EEB3417DDAC9@Herge.rcsinc.local> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.02 required=5 tests=[AWL=0.020] X-Spam-Score: 0.02 X-Spam-Level: X-Archive-Number: 200512/297 X-Sequence-Number: 16118 On Mon, Dec 12, 2005 at 01:33:27PM -0500, Merlin Moncure wrote: > > The cost depends on your usage patterns. I did tests with one of > > my applications and saw no significant performance difference for > > simple selects, but a series of insert/update/delete operations ran > > about 30% slower when block- and row-level statistics were enabled > > versus when the statistics collector was disabled. > > That approximately confirms my results, except that the penalty may even > be a little bit higher in the worst-case scenario. Row level stats hit > the hardest if you are doing 1 row at a time operations over a > persistent connection. That's basically how the application I tested works: it receives data from a stream and performs whatever insert/update/delete statements are necessary to update the database for each chunk of data. Repeat a few thousand times. -- Michael Fuhr