Indexes
Add database indexes to improve query performance on your custom tables.
Database indexes speed up queries by allowing MySQL to find rows without scanning the entire table. You configure indexes in Step 3 of the table wizard.
When to add an index
Add an index on a column if you:
Filter or search records by that column frequently
Use that column in a
WHEREclause in REST API queriesJoin tables on that column via a foreign key (MySQL often does this automatically for foreign keys)
Indexes improve read performance at the cost of slightly slower writes. For small tables (< 1,000 rows) the difference is negligible.
Creating an index
Open the table wizard and navigate to Step 3 — Indexes.
Click Add index.
Fill in the index settings:
Index name
Unique identifier for this index within the table.
Key parts
The columns included in the index. Multi-column (composite) indexes are supported.
Index type
See types below.

Index types
INDEX
Standard B-tree index. Suitable for most query patterns.
UNIQUE
Enforces uniqueness across the indexed column(s). Use for columns that must not contain duplicate values.
FULLTEXT
Optimized for full-text search on text and longtext columns. Enables MATCH ... AGAINST queries.
SPATIAL
Used for geometric/geographic data types. Rarely needed for standard CCT use cases.
Example
For a movies table that is frequently filtered by year and director_id:
idx_year
year
INDEX
idx_director
director_id
INDEX
Deleting an index
Click the Delete icon next to the index in Step 3 of the wizard. The index is removed from the database the next time the table schema is synced.
Last updated