Questions  /  Working with Data  /  SQL

How to add indexes to CARTO datasets

Learn how to add indexes to table columns to improve filtering and grouping performance.

PostgreSQL indexes help users to speed up data retrieval in costly operations such as filtering, joining or grouping by some column name and/or expersion. In order to add one to your table, you will need to use the following syntax:

CREATE INDEX idx_column on table_name (column) 

You can learn more about CREATE INDEX operations in PostgreSQL documentation.