Quantcast
Channel: Planet PostgreSQL
Viewing all articles
Browse latest Browse all 9644

Bruce Momjian: Partial Indexes

$
0
0

Having covered expression indexes, I want to cover another index feature — partial indexes. Partial indexes allow you to create an index on part of a table. Why would you want to do that?

  • index only frequently-accessed values, allowing smaller index files
  • avoid indexing common values, which are unlikely to be useful in an index
  • smaller index files allow faster index traversal and improve index caching
  • avoid index insertion overhead for non-indexed values
  • constrain uniqueness to a subset of table rows

People usually don't use expression or partial indexes initially, but there are certainly some use-cases that can only be solved with these index features.


Viewing all articles
Browse latest Browse all 9644

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>