Skip to main content

Indexer

Database indexes improve query performance for large collections.

What are Indexes?

Indexes help the database find records faster, similar to an index in a book. Without indexes, the database must scan every record to find matches.

Creating an Index

  1. Navigate to your collection's Indexer tab
  2. Click + Add Another Indexer
  3. Configure the index:
FieldDescription
FieldsSelect one or more fields to index
NameAuto-generated index name (e.g., users_email_idx)
UniqueEnforce unique values across selected fields
  1. Click Save to create the index

When to Use Indexes

Add indexes for:

  • Fields frequently used in search/filter
  • Fields used in WHERE clauses
  • Foreign key fields
  • Fields that need unique constraints

Avoid indexes for:

  • Fields rarely queried
  • Small collections (< 1000 records)
  • Fields with low cardinality (few unique values)

Compound Indexes

Select multiple fields to create a compound index. Useful when you often query by multiple fields together.

Example: Index on (customer_id, order_date) for efficient customer order lookups.

Unique Indexes

Check Unique to prevent duplicate values. This enforces data integrity at the database level.

Use cases:

  • Email addresses
  • Usernames
  • SKU codes
  • Fields — Configure field settings
  • ERD View — Visualize your schema
  • Options — General collection settings