Re: What is wrong with hashed index usage?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>, mloftis(at)wgops(dot)com, DCorbit(at)connx(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: What is wrong with hashed index usage?
Date: 2002-06-21 15:03:25
Message-ID: 200206211503.g5LF3PP20126@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > OK, which part of is "demonstrably false"? I think the old "should
> > generally be preferred" is too vague. No one has come up with a case
> > where hash has shown to be faster, and a lot of cases where it is slower.
>
> The only thing I recall being lots worse is initial index build.
>
> I have not tested it much, but I would expect that hash holds up better
> in the presence of many equal keys than btree does...

I remember three problems: build time, index size, and concurrency
problems. I was wondering about the equal key case myself, and assumed
hash may be a win there, but with the concurrency problems, is that even
possible?

OK, I have reworded it. Is that better? How about an elog(NOTICE) for
hash use?

--
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

Attachment Content-Type Size
unknown_filename text/plain 1.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Doug Fields 2002-06-21 15:07:09 Re: Idea for the statistics collector
Previous Message Thomas Lockhart 2002-06-21 14:56:51 Re: ADTs and embedded sql