← Changelog
NewApps

Problems warns when a read needs an index

When a read sorts, takes a range, a startsWith or contains, or searches a model of 50,000 records or more without an index, and is slow, Problems now shows a warning on the model's schema with the indexes entry that would serve it, such as { fields: ["shop", "createdAt"] }. It covers the REST API, actions' api and the MCP server, in development and production.

Each warning counts how often the read happened, when it last did and its slowest time, so a busy route makes one warning, not thousands. It clears once the index is built, or after a week without that read. The deploy plan lists production's warnings that the deploy doesn't declare an index for.

More in Indexes.