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

# Records list columns and index warnings

Choose the columns and default sort of a collection's records list, and see where a sort has no MongoDB index.

**Where:** Database → Collections → row menu → **Edit schema** → **List** tab · `/projects/<project>/db/schemas/<schemaName>/edit` (List tab)

The **List** tab sets which fields the [records list](/codemash/cloud/database/collections/records.md) shows and how it is sorted when it opens. It also reads the collection's MongoDB indexes and warns when a column or the default sort would sort without an index — a slow, full scan on a large collection. Changes save by themselves and apply to everyone on the team.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-9fa77ab1ad83b250899cebff791e065f55279e8e%2Fschema-indexes-1.png?alt=media" alt="List tab of books: Records list columns with Available fields Title, Pages, In stock and Genre ticked and Record id, Created on, Modified on marked SYSTEM; Visible columns (4) Title and Pages with a warning triangle, In stock, Genre; Default sort Title, Ascending, and the orange warning No index on this field — sorting may be slow on large collections, with How to create an index"><figcaption><p>The List tab of books: two sortable columns and the default sort have no index.</p></figcaption></figure>

## Columns, search and filters

| Part                | What it shows                                                                                                                                                                                                                            |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Available fields    | Every field that can be a column: the schema fields, plus **Record id**, **Created on** and **Modified on** (marked `SYSTEM`). Tick a field to show it.                                                                                  |
| Visible columns (n) | The chosen columns in order. Drag ⠿ to reorder; ✕ (**Remove column**) drops one. A ⚠ marker means *No index on this field — sorting may be slow on large collections.* With no column chosen, the records list shows every schema field. |
| Default sort        | The column and the order (**Ascending** / **Descending**) the records list opens with, or **Newest first (default)**. Only visible columns that always have a value — required fields and system fields — can be picked.                 |
| Saved …             | The time of the last automatic save, top right.                                                                                                                                                                                          |

A sort on field `F` is covered only when `F` is the **first** key of an index: an index on `lastName, firstName` covers `lastName`, not `firstName`. `_id` always has an index, so **Newest first** is always fast. The tab needs a published schema (*Schema not published yet* otherwise) and `database:read` on the collection.

Norbix does not create indexes: add them on the MongoDB side — in your own cluster, or in MongoDB Atlas for a managed Flex cluster. The ⚠ disappears when the index exists.

## What you can do here

* Pick the records-list columns and the default sort (above), then open the [records list](/codemash/cloud/database/collections/records.md) to see them.
* [Edit the schema](/codemash/cloud/database/collections/edit-schema.md) — the **Schema**, **Triggers** and **Settings** tabs of the same builder.
* Read the indexes from code:

```ts
const { indexes } = await norbix.hub.database.getCollectionIndexes({ collectionName: 'books' });
console.log(indexes); // [{ name: '_id_', keys: [{ field: '_id', order: 1 }] }]
```

```sh
norbix hub database collection indexes get --collectionName books
```

API: [Get Collection Indexes](/codemash/api-reference/database/collections/get-collection-indexes.md) · [Get Database Schema List Settings](/codemash/api-reference/database/schemas/get-database-schema-list-settings.md) · [Update Database Schema List Settings](/codemash/api-reference/database/schemas/update-database-schema-list-settings.md)
