> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/cloud/database/collections/schema-indexes.md).

# Schema Indexes

**Where:** Database → Collections → collection → Schema editor → **List** tab

{% hint style="info" %}
Screenshot TODO — capture comes from testing-plan area **03-database-collections**.
{% endhint %}

There is no separate index-management screen. The dashboard reads the collection's MongoDB indexes (via `listIndexes`) and uses them in the schema editor's **List** tab to warn you before a slow sort ships to your team.

## How index coverage works

Each index lists one or more fields as its **keys**; `_id` always has its built-in index. A sort on field `F` is only index-covered when `F` is the **first key** of an existing index. For example, an index with keys `[{ "field": "lastName" }, { "field": "firstName" }]` covers sorting by `lastName`, but **not** by `firstName`.

On the **List** tab, every selected column that is not covered gets a ⚠ marker with the tooltip *No index on this field — sorting may be slow on large collections.* The same coverage rule decides whether the records list's default sort runs fast.

Indexes themselves are created on the MongoDB side (your own cluster or the managed Flex cluster), not from this screen.

## Use it from code

[Database → Collections](/sdks-and-cli/database/collections.md)

## API reference

Endpoints: [Database → Collections](/api-reference/database/collections.md).
