There are some tricks to consider when using the SQL API that might make your application a little faster.
In order to better improve map performance, advanced users can use the SQL API to add custom indexes to their data. Creating indexes is useful if you have a large dataset with filtered data. By indexing select data, you are improving the performance of the map and generating the results faster. The index functionality is useful in the following scenarios:
Indexed data is typically a single column representing filtered data. To create a single column index, apply this SQL query to your dataset:
Tip: You can also apply more advanced, multi-column indexes. Please review the full documentation about PostgreSQL Indexes before proceeding.
Note: Indexes are allocated towards the amount of data storage associated with your account. Be mindful when creating custom indexes. Note that indexes automatically generated by CARTO are not counted against your quota. For example, the_geom
and cartodb_id
columns. These columns are used to index geometries for your dataset and are not associated with storage.