Re: USING HASH considered harmful?

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: USING HASH considered harmful?
Дата
Msg-id
200108170159.f7H1x2919714@candle.pha.pa.us
Ответ на
USING HASH considered harmful? (Stephen Robert Norris)
Список
Дерево обсуждения
USING HASH considered harmful? Stephen Robert Norris <srn@commsecure.com.au>
Re: USING HASH considered harmful? Bruce Momjian <pgman@candle.pha.pa.us>
Re: USING HASH considered harmful? Stephen Robert Norris <srn@commsecure.com.au>
Re: USING HASH considered harmful? Bruce Momjian <pgman@candle.pha.pa.us>
Re: USING HASH considered harmful? Tom Lane <tgl@sss.pgh.pa.us>

Checking application/pgp-signature: FAILURE
-- Start of PGP signed section.
> We've just discovered a rather nasty feature of hashes, namely that
> simultaneous reads & writes to a single row will deadlock if there
> is a hash index on the table.
> 
> I guess this is because PG really has to lock the hash table entry in
> both cases. It does, however, make HASH indices completely useless for
> any table that you might want to update.
> 
> Is this a known feature?

Yes, I have heard about this problem.  Would you test btree vs hash and
report back which is faster.  I have requested this from >20 people and
no one reported back.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
В списке pgsql-general по дате отправления
От: Tom Lane
Дата:
От: Hiroshi Inoue
Дата:
Сообщение: Re: Perfomance decreasing
FAQ