Re: What is wrong with hashed index usage?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Michael Loftis <mloftis(at)wgops(dot)com>
Cc: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, Dann Corbit <DCorbit(at)connx(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: What is wrong with hashed index usage?
Date: 2002-04-23 23:54:53
Message-ID: 200204232354.g3NNsr002293@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Michael Loftis wrote:
> The benchmarks will depend mostly on the depth of the Btree. Hashes
> will be markedly faster only in the case(s) where descending into the
> tree to produce a matching leaf node would take longer than walking to
> the appropriate item in a hash.
>
> Most of the time until the btree gets deep they are nearly equivalent.
> When the tree ends up becoming many levels deep it can take longer to
> walk than the hash.

And what causes the btree to get deep? Is it just the number of rows in
the index?

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nicolas Bazin 2002-04-24 00:04:06 timeout implementation issues
Previous Message Bruce Momjian 2002-04-23 23:46:10 Re: ?Missing '#define FUNC_MAX_ARGS' in pg_config.h.win32?