Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 811C813364DE for ; Thu, 28 Oct 2010 10:34:45 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 44676-10 for ; Thu, 28 Oct 2010 13:34:38 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mh3.mail.rice.edu (mh3.mail.rice.edu [128.42.199.10]) by mail.postgresql.org (Postfix) with ESMTP id D57A41335B36 for ; Thu, 28 Oct 2010 10:34:37 -0300 (ADT) Received: from mh3.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh3.mail.rice.edu (Postfix) with ESMTP id 94A1C28F6DA; Thu, 28 Oct 2010 08:34:37 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh3.mail.rice.edu, auth channel Received: from mh3.mail.rice.edu ([127.0.0.1]) by mh3.mail.rice.edu (mh3.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id dRVwpvf1Yj1V; Thu, 28 Oct 2010 08:34:37 -0500 (CDT) X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.is.rice.edu (aart.is.rice.edu [168.7.56.48]) by mh3.mail.rice.edu (Postfix) with ESMTP id 6524028F6AE; Thu, 28 Oct 2010 08:34:37 -0500 (CDT) Received: by aart.is.rice.edu (Postfix, from userid 18612) id C65CA2D5A6; Thu, 28 Oct 2010 08:34:36 -0500 (CDT) Date: Thu, 28 Oct 2010 08:34:36 -0500 From: Kenneth Marshall To: Tom Lane Cc: Pierre C , Robert Haas , Mladen Gogala , pgsql-performance@postgresql.org Subject: Re: Select count(*), the sequel Message-ID: <20101028133436.GE27429@aart.is.rice.edu> References: <4CB9D89E.7050701@vmsinfo.com> <20101016184443.GA4993@aart.is.rice.edu> <2091.1288133491@sss.pgh.pa.us> <20101027204115.GB27429@aart.is.rice.edu> <29056.1288216182@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <29056.1288216182@sss.pgh.pa.us> User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-4.21 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/535 X-Sequence-Number: 40953 On Wed, Oct 27, 2010 at 05:49:42PM -0400, Tom Lane wrote: > Kenneth Marshall writes: > > Just keeping the hope alive for faster compression. > > Is there any evidence that that's something we should worry about? > I can't recall ever having seen a code profile that shows the > pg_lzcompress.c code high enough to look like a bottleneck compared > to other query costs. > > Now, the benefits of 2X or 3X space savings would be pretty obvious, > but I've seen no evidence that we could easily achieve that either. > > regards, tom lane > One use is to allow substr() on toasted values without needing to decompress the entire contents. Another possibility is to keep larger fields compressed in memory for some value of "larger". With faster compression, it might by useful to compress the WAL files to support faster data rates and therefore update rates for the same hardware. And there are always the in page common substring storage optimizations to reduce index/table sizes. Regards, Ken