Re: [PATCH]-hash index improving - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: [PATCH]-hash index improving
Date
Msg-id 4880AC3D.5050704@enterprisedb.com
Whole thread Raw
In response to Re: [PATCH]-hash index improving  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: [PATCH]-hash index improving  (Gregory Stark <stark@enterprisedb.com>)
Re: [PATCH]-hash index improving  ("Jonah H. Harris" <jonah.harris@gmail.com>)
List pgsql-hackers
Gregory Stark wrote:
> For i/o-bound databases with very large indexes there should be an opportunity
> where btree lookups are O(logn) and hash lookups can in theory be O(1).

Ignoring the big-O complexity, if a hash index only stores a 32-bit hash 
code instead of the whole key, it could be a big win in storage size, 
and therefore in cache-efficiency and performance, when the keys are 
very long.

Granted, it's not very common to use a 1K text field as a key column...

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: Postgres-R: primary key patches
Next
From: Gregory Stark
Date:
Subject: Re: [PATCH]-hash index improving