Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL - Mailing list pgsql-general

From Jim C. Nasby
Subject Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
Date
Msg-id 20050510153927.GB31103@decibel.org
Whole thread Raw
In response to Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
List pgsql-general
On Tue, May 10, 2005 at 12:10:57AM -0400, Tom Lane wrote:
> be responsive to your search.)  (This also brings up the thought that
> it might be interesting to support hash buckets smaller than a page ...
> but I don't know how to make that work in an adaptive fashion.)

IIRC, other databases that support hash indexes also allow you to define
the bucket size, so it might be a good start to allow for that. DBA's
usually have a pretty good idea of what a table will look like in
production, so if there's clear documentation on the effect of bucket
size a good DBA should be able to make a good decision.

What's the challange to making it adaptive, comming up with an algorithm
that gives you the optimal bucket size (which I would think there's
research on...) or allowing the index to accommodate different bucket
sizes existing in the index at once? (Presumably you don't want to
re-write the entire index every time it looks like a different bucket
size would help.)
--
Jim C. Nasby, Database Consultant               decibel@decibel.org
Give your computer some brain candy! www.distributed.net Team #1828

Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"

pgsql-general by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: [PERFORM] "Hash index" vs. "b-tree index" (PostgreSQL
Next
From: Douglas McNaught
Date:
Subject: Re: pg_dump fails on 7.4 Postgres