Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: Making hash indexes worthwhile


  • From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
  • To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
  • Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
  • Subject: Re: Making hash indexes worthwhile
  • Date: Sat, 31 Oct 2009 00:25:25 -0400
  • Message-id: <28292.1256963125@sss.pgh.pa.us> <text/plain>

Jeff Janes <jeff(dot)janes(at)gmail(dot)com> writes:
> So my conclusions are:

> 2) Heavy-weight locks are called that for a reason, they use a lot of
> CPU even without contention.

> 3) The CPU usage of the hash-index code proper is quite small, with
> more time being spent in heavy-weight PageLocks (specific to hash
> indexes, but not part of the hash index code itself) and in executor
> code common to all index methods, than in the hash index code.

Interesting.  My reaction to that would be to try to replace the
heavyweight locks with LWLocks.  IIRC the reason for using heavyweight
locks was fear of deadlocks, but maybe closer analysis and some tweaking
would allow us to eliminate that risk.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group