Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 9FE7E1337B81 for ; Wed, 27 Oct 2010 17:54:33 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 79752-04 for ; Wed, 27 Oct 2010 20:54:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mail.postgresql.org (Postfix) with ESMTP id 32CD51337B9A for ; Wed, 27 Oct 2010 17:54:25 -0300 (ADT) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PBD0q-0002nA-VC for pgsql-performance@postgresql.org; Wed, 27 Oct 2010 22:54:24 +0200 Received: from 217.110.94.67 ([217.110.94.67]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Oct 2010 22:54:24 +0200 Received: from spam_eater by 217.110.94.67 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 27 Oct 2010 22:54:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-performance@postgresql.org From: Thomas Kellerer Subject: Re: Select count(*), the sequel Date: Wed, 27 Oct 2010 22:54:11 +0200 Lines: 28 Message-ID: References: <4CB9D89E.7050701@vmsinfo.com> <20101016184443.GA4993@aart.is.rice.edu> <2091.1288133491@sss.pgh.pa.us> <20101027204115.GB27429@aart.is.rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 217.110.94.67 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 In-Reply-To: <20101027204115.GB27429@aart.is.rice.edu> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.746 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_NUMERIC_HELO=1.164, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/514 X-Sequence-Number: 40932 Kenneth Marshall, 27.10.2010 22:41: > Different algorithms have been discussed before. A quick search turned > up: > > quicklz - GPL or commercial > fastlz - MIT works with BSD okay > zippy - Google - no idea about the licensing > lzf - BSD-type > lzo - GPL or commercial > zlib - current algorithm > > Of these lzf can compress at almost 3.7X of zlib and decompress at 1.7X > and fastlz can compress at 3.1X of zlib and decompress at 1.9X. The same > comparison put lzo at 3.0X for compression and 1.8X decompress. The block > design of lzl/fastlz may be useful to support substring access to toasted > data among other ideas that have been floated here in the past. > > Just keeping the hope alive for faster compression. What about a dictionary based compression (like DB2 does)? In a nutshell: it creates a list of "words" in a page. For each word, the occurance in the db-block are stored and the actual word is removed from the page/block itself. This covers all rows on a page and can give a very impressive overall compression. This compression is not done only on disk but in-memory as well (the page is loaded with the dictionary into memory). I believe Oracle 11 does something similar. Regards Thomas