Read more

Rails: Postgres Partial Indexing

Henning Koch
January 25, 2021Software engineer at makandra GmbH

PostgreSQL has partial indexes Show archive.org snapshot . With a partial index you tell Postgres to only index rows matching a given query.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot

Some uses cases for a partial index:

  • You want a uniqueness index, but only under some conditions
  • Your table is very large and indexing every row becomes expensive

The linked article Show archive.org snapshot shows how to create a partial index with Rails.

Posted by Henning Koch to makandra dev (2021-01-25 15:48)