Re: Reverse Key Index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 inserts with 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 it does 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, many inserts 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 us a gin/gist index or even a simple btree index using a trigram index to speed up a "LIKE '%abc%'" (something Oracle can't do at all) without having to worry about obfuscation layers (aka ORM).

Thomas






-- 
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux