Re: Reverse Key Index

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Reverse Key Index
Дата
Msg-id mcn4m4$o9b$1@ger.gmane.org
обсуждение исходный текст
Ответ на Re: Reverse Key Index  ("Sven R. Kunze" <srkunze@tbz-pariv.de>)
Ответы Re: Reverse Key Index  ("Sven R. Kunze" <srkunze@tbz-pariv.de>)
Список pgsql-performance
Sven R. Kunze schrieb am 26.02.2015 um 13:23:
> If you think Reverse Key Indexes have no usage here in PostgreSQL, you should not support convenience features
> for easily improving performance without breaking the querying API

It's also unclear to me which "performance" you are referring to.
Insert performance? Retrieval performance? Concurrency?

The use-case for reverse indexes in Oracle is pretty small: it's _only_ about the contention when doing a lot of
insertswith increasing numbers (because the different transactions will be blocked when accessing the blocks in
question). 

As Postgres manages inserts differently than Oracle I'm not so sure that this problem exists in Postgres the same way
itdoes in Oracle. 
That's why I asked if you have a _specific_ problem.

Richard Footes blog post is mostly about the myth that _if_ you have a reverse index this is only used for equality
operations. 
It does not claim that a reverse index is faster than a regular index _if_ it is used for a range scan.

The question is: do you think you need a reverse index because you have a performance problem with when doing many,
manyinserts at the same time using "close-by" values into a table that uses a btree index on the column?  

Or do you think you need a reverse index to improve the performance of a range scan? If that is the then you can easily
usa gin/gist index or even a simple btree index using a trigram index to speed up a "LIKE '%abc%'" (something Oracle
can'tdo at all) without having to worry about obfuscation layers (aka ORM). 

Thomas




В списке pgsql-performance по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Reverse Key Index
Следующее
От: "Sven R. Kunze"
Дата:
Сообщение: Re: Reverse Key Index