Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WfU3I-0001qE-CU for pgsql-advocacy@arkaria.postgresql.org; Wed, 30 Apr 2014 12:55:56 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WfU3H-0004Pj-SZ for pgsql-advocacy@arkaria.postgresql.org; Wed, 30 Apr 2014 12:55:55 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WfU3H-0004Pa-A2; Wed, 30 Apr 2014 12:55:55 +0000 Received: from proofpoint2.mail.rice.edu ([128.42.201.101] helo=pp2.rice.edu) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WfU3B-0005my-FK; Wed, 30 Apr 2014 12:55:54 +0000 Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id s3UCrgef028095; Wed, 30 Apr 2014 07:55:45 -0500 Received: from mh2.mail.rice.edu (mh2.mail.rice.edu [128.42.201.21]) by pp2.rice.edu with ESMTP id 1kjgaercyu-1; Wed, 30 Apr 2014 07:55:44 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh2.mail.rice.edu, auth channel X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no X-SMTP-Auth: no Received: from aart.rice.edu (aart.rice.edu [168.7.56.48]) by mh2.mail.rice.edu (Postfix) with ESMTP id A2549500122; Wed, 30 Apr 2014 07:55:44 -0500 (CDT) Received: by aart.rice.edu (Postfix, from userid 18612) id 8CCD3100525; Wed, 30 Apr 2014 07:55:44 -0500 (CDT) Date: Wed, 30 Apr 2014 07:55:44 -0500 From: "ktm@rice.edu" To: Peter Geoghegan Cc: Robert Haas , Tan Tran , Greg Stark , pgsql-advocacy , PostgreSQL-development Subject: Re: [HACKERS] GSoC on WAL-logging hash indexes Message-ID: <20140430125544.GG5746@aart.rice.edu> References: <54977A8C-4AF5-4BCC-B021-78E9CA978077@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-12-10) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=4.20774526332934e-14 kscore.compositescore=0 circleOfTrustscore=0 compositescore=0.995703810101747 urlsuspect_oldscore=0.995703810101747 suspectscore=0 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 rbsscore=0.995703810101747 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.9 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1404300199 X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-advocacy Precedence: bulk Sender: pgsql-advocacy-owner@postgresql.org On Wed, Apr 30, 2014 at 12:26:20AM -0700, Peter Geoghegan wrote: > On Mon, Mar 3, 2014 at 8:12 AM, Robert Haas wrote: > >> As a GSoC student, I will implement WAL recovery of hash indexes using the > >> other index types' WAL code as a guide. > > Frankly, I'm skeptical of the idea that hash indexes will ever really > be useful. I realize that that's a counter-intuitive conclusion, but > there are many things we could do to improve B-Tree CPU costs to make > them closer to those of hash indexes, without making them any less > flexible. I myself would much rather work on that, and intend to. > > The O(1) cost seems attractive when you consider that that only > requires that we read one index page from disk to service any given > index scan, but in fact B-Trees almost always only require the same. > They are of course also much more flexible. The concurrency > characteristics B-Trees are a lot better understood. I sincerely > suggest that we forget about conventional hash table type indexes. I > fear they're a lost cause. > > -- > Peter Geoghegan > Hi Peter, I do not think that CPU costs matter as much as the O(1) probe to get a result value specifically for very large indexes/tables where even caching the upper levels of a B-tree index would kill your working set in memory. I know, I know, everyone has so much memory and can just buy more... but this does matter. I also think that development of hash indexes has been stalled waiting for WAL logging. For example, hash indexes can almost trivially become more space efficient as they grow in size by utilizing the page number to represent the prefix bits of the hash value for a bucket. My 2 cents. Ken -- Sent via pgsql-advocacy mailing list (pgsql-advocacy@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-advocacy