pg.ddx.io  pgsql-students@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@2ndquadrant.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Peter Geoghegan <pg@heroku.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: ktm@rice.edu <ktm@rice.edu>
Cc: Tan Tran <tankimtran@gmail.com>
Cc: Greg Stark <stark@mit.edu>
Cc: pgsql-advocacy <pgsql-advocacy@postgresql.org>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] GSoC on WAL-logging hash indexes
Date: Wed, 30 Apr 2014 20:15:14 +0200
Message-ID: <20140430181514.GA28822@awork2.anarazel.de> (raw)
In-Reply-To: <CAMkU=1xVrLq4sDxvRyvAn7sG=nQGt-PiCrf9=PYJ4nXziN3srQ@mail.gmail.com>
References: <B444B441-397F-4EDA-8A0C-877B9AF7033B@gmail.com>
	<54977A8C-4AF5-4BCC-B021-78E9CA978077@gmail.com>
	<CA+TgmoY4X7VKyC4dAwujuTuBoyxE2qSJF9aybhWZjxXWoc6J8w@mail.gmail.com>
	<CAM3SWZRBpAz=bZYCxvQDSGKR5OA5yEhGVOCit7AyStUtq2cBDA@mail.gmail.com>
	<20140430125544.GG5746@aart.rice.edu>
	<CAM3SWZR+OBRiMN=L6CrJDKtH+7eEJwhwYhT2fsP-B_oC0qHyVQ@mail.gmail.com>
	<CA+TgmoYqx312omye5wVhT_rsy7a6OGUe2YRWUt=b72wrOsou5w@mail.gmail.com>
	<CAM3SWZQYmqdASR=xNgLZHgGngA29g_1ngOTDv=pHJ3vTj0sAgA@mail.gmail.com>
	<CAMkU=1xVrLq4sDxvRyvAn7sG=nQGt-PiCrf9=PYJ4nXziN3srQ@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-advocacy>

On 2014-04-30 11:10:22 -0700, Jeff Janes wrote:
> I've seen the simple pinning and unpinning of the root page (or the fast root,
> whatever the first page we bother to pin on a regular basis is called) be a
> point of contention.  When one index dominates the entire system workload, that
> one page also drives contention on the spin lock that protects the lwlock that
> share-protects whichever buffer mapping partition happens to contain it.

To quite some degree that's an implementation deficiency of our lwlocks
though. I've seen *massive* improvements with my lwlock patch for that
problem. Additionally we need to get rid of the spinlock around
pin/unpin.
That said, even after those optimizations, there remains a significant
amount of cacheline bouncing. That's much easier to avoid for something
like hash indexes than btrees.

I think another advantage is that hash indexes can be *much* smaller
than btree when the individual rows are wide. I wonder though if we
couldn't solve that better by introducing "transforms" around the looked
up data. E.g. allow to *transparently* use a hash(indexed_column) to be
used. If you currently do that a lot of work has to be done in every
query...

Greetings,

Andres Freund

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


-- 
Sent via pgsql-advocacy mailing list (pgsql-advocacy@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-advocacy



view thread (36+ messages)  latest in thread

Message-ID: <20140430181514.GA28822@awork2.anarazel.de>
Permalink:  ../20140430181514.GA28822@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20140430181514.GA28822@awork2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-students@postgresql.org
  Cc: andres@2ndquadrant.com, jeff.janes@gmail.com, pg@heroku.com, robertmhaas@gmail.com, ktm@rice.edu, tankimtran@gmail.com, stark@mit.edu, pgsql-advocacy@postgresql.org, pgsql-hackers@postgresql.org
  Subject: Re: [HACKERS] GSoC on WAL-logging hash indexes
  In-Reply-To: <20140430181514.GA28822@awork2.anarazel.de>
  References: <B444B441-397F-4EDA-8A0C-877B9AF7033B@gmail.com> <54977A8C-4AF5-4BCC-B021-78E9CA978077@gmail.com> <CA+TgmoY4X7VKyC4dAwujuTuBoyxE2qSJF9aybhWZjxXWoc6J8w@mail.gmail.com> <CAM3SWZRBpAz=bZYCxvQDSGKR5OA5yEhGVOCit7AyStUtq2cBDA@mail.gmail.com> <20140430125544.GG5746@aart.rice.edu> <CAM3SWZR+OBRiMN=L6CrJDKtH+7eEJwhwYhT2fsP-B_oC0qHyVQ@mail.gmail.com> <CA+TgmoYqx312omye5wVhT_rsy7a6OGUe2YRWUt=b72wrOsou5w@mail.gmail.com> <CAM3SWZQYmqdASR=xNgLZHgGngA29g_1ngOTDv=pHJ3vTj0sAgA@mail.gmail.com> <CAMkU=1xVrLq4sDxvRyvAn7sG=nQGt-PiCrf9=PYJ4nXziN3srQ@mail.gmail.com> <20140430181514.GA28822@awork2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox