Postgres Indexes

Postgres indexes are a way of increasing query performance based on columns that are queried frequently. The concept is similar to the one of an index in a book. It helps accessing the data you're looking for more quickly by maintaining additional metadata.

Let's say the database receives a large number of requests of authors being queried by their name, for example:

SELECT * FROM authors WHERE name = 'J.K. Rowling';

Since the database is now able to look up the result of these queries more quickly, the performance of these queries will increase significantly.

Indexes can be used to optimize query performance in Hasura. Refer to this page for information about query performance and how to add Postgres indexes to Hasura.

Last updated