Hey! This content applies only to previous CARTO products

Please check if it's relevant to your use case. On October 2021 we released a new version of our platform.
You can learn more and read the latest documentation at docs.carto.com

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.