Re: Question on indexes
От | Laurenz Albe |
---|---|
Тема | Re: Question on indexes |
Дата | |
Msg-id | f8624649dc10bcb5a908f3054b6377e8573ffc12.camel@cybertec.at обсуждение исходный текст |
Ответ на | Question on indexes (sud <suds1434@gmail.com>) |
Список | pgsql-general |
On Fri, 2024-10-11 at 00:19 +0530, sud wrote: > I have never used any 'hash index' but saw documents in the past suggesting issues > around hash index , like WAL doesnt generate for "hash index" which means we can't > get the hash index back after crash also they are not applied to replicas etc. > And also these indexes can not be used for range queries , for sorting etc. > > However, we are seeing that one of the databases has multiple hash indexes created. > So I wanted to understand from experts here, if it's advisable in any specific > scenarios over B-tre despite such downsides? > Note- Its version 15.4 database. It is safe to use them, but in my tests I didn't find a realistic case where the were better than a B-tree index: https://www.cybertec-postgresql.com/en/postgresql-hash-index-performance/ Keep them if they do the trick for you, but I'd use B-tree indexes instead. Yours, Laurenz Albe
В списке pgsql-general по дате отправления: