Indexing & query tuning

A step of the Cloud application tree on Gradus, in the Data & storage area: DB, cache, queues.

Find the slow queries, add the indexes they need and keep a query plan check in the test suite.

Usually comes after: Data access layer & seed data.

Leads to: Full-text search.

Prompt for your AI assistant

Identify the slowest database queries using the query log or EXPLAIN, add the indexes they need and add a test that fails if a critical query starts doing a sequential scan.

This is https://gradus.kazet.blog/tree/cloud-application/step/indexing-and-query-tuning as plain HTML. In a browser the page also lets you mark the step forged and copy a message for your AI assistant.