Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WfYvs-00053P-KN for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Apr 2014 18:08:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WfYvr-0000RP-Qa for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Apr 2014 18:08:35 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WfYvq-0000RH-3D for pgsql-hackers@postgresql.org; Wed, 30 Apr 2014 18:08:34 +0000 Received: from smtp.01.com ([199.36.142.181]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WfYvm-0001Xt-TB for pgsql-hackers@postgresql.org; Wed, 30 Apr 2014 18:08:33 +0000 Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id A778F40836D; Wed, 30 Apr 2014 12:58:31 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ztWpN-DJrTVl; Wed, 30 Apr 2014 12:58:31 -0500 (CDT) Received: from smtp.01.com (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 81B29408465; Wed, 30 Apr 2014 12:58:31 -0500 (CDT) Received: from localhost (localhost [127.0.0.1]) by smtp-out-2.01.com (Postfix) with ESMTP id 703A44083ED; Wed, 30 Apr 2014 12:58:31 -0500 (CDT) X-Virus-Scanned: amavisd-new at smtp-out-2.01.com Received: from smtp.01.com ([127.0.0.1]) by localhost (smtp-out-2.01.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id ymRZl3jRdL5M; Wed, 30 Apr 2014 12:58:31 -0500 (CDT) Received: from [172.47.23.102] (50-0-190-100.dsl.dynamic.sonic.net [50.0.190.100]) by smtp-out-2.01.com (Postfix) with ESMTPSA id 7E43640836D; Wed, 30 Apr 2014 12:58:30 -0500 (CDT) Message-ID: <536139C5.7070601@agliodbs.com> Date: Wed, 30 Apr 2014 10:58:29 -0700 From: Josh Berkus Organization: PostgreSQL Experts Inc. User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Robert Haas , Peter Geoghegan CC: "ktm@rice.edu" , Tan Tran , Greg Stark , PostgreSQL-development Subject: Re: GSoC on WAL-logging hash indexes References: <54977A8C-4AF5-4BCC-B021-78E9CA978077@gmail.com> <20140430125544.GG5746@aart.rice.edu> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org All, (dropping pgsql-advocacy off the cc list) On 04/30/2014 10:11 AM, Robert Haas wrote: > On Wed, Apr 30, 2014 at 12:54 PM, Peter Geoghegan wrote: >> On Wed, Apr 30, 2014 at 5:55 AM, ktm@rice.edu wrote: >>> 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. >> >> Have you actually investigated how little memory it takes to store the >> inner pages? It's typically less than 1% of the entire index. AFAIK, >> hash indexes are not used much in any other system. I think MySQL has >> them, and SQL Server 2014 has special in-memory hash table indexes for >> in memory tables, but that's all I can find on Google. Hash indexes are more important for MySQL because they have index-organized tables. > I thought the theoretical advantage of hash indexes wasn't that they > were smaller but that you avoided a central contention point (the > btree root). Yes. And being smaller isn't insignificant; think of billion-row tables with fairly random access over the whole table. Also, *theoretically*, a hash index could avoid the rebalancing issues which cause our btree indexes to become bloated and need a REINDEX with certain update patterns. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers