Is there any index type in PostgreSQL that gives O(1) complexity for lookups? on strings?
Postgresql – ny index with O(1) complexity for lookup in PostgreSQL
indexpostgresql
Related Question
- Postgresql – Simple PostgreSQL lookup table is inexplicably slow
- PostgreSQL: Find rows for which any index of any value contained is over a given size
- PostgreSQL – How to Show Creation Statement for an Index
- PostgreSQL Index – Optimize for LIKE and = Queries
- Postgresql small index for row contains query
- Postgresql – Any drawbacks of using GIN PostgreSQL index for an integer foreign key
- MySQL – Does Unique Clustered Index Provide Array-Like Lookup Performance?
Best Answer
You'll need to the read the PostgresSQL Index Types documentation for the version that you are using. I think you are looking for a Hash Index, but as as the documentation explains the real world performance and pros and cons depend on the implementation details and recommendations of the particular version that you are using.