← Back to library

▶ quest log

Add Database Indexes Before Full Table Scans Melt the Server

Engineering Best PracticesIntermediateAdvanced@mattmurphyaisaved AUG 30

◇ Could this help me?

Yes. Indexing filtered columns, selecting only needed fields, and slow-query logging are textbook relational database practice, and the advice is accurate as presented, including testing before and after on real data. General practice: applies to any application backed by a database, whether the queries were written by an AI or a person.

✦ Walkthrough+10 xp / step
0 / 3 steps · adopt for +40
$ suggested_prompt+40xp

Audit every database query in this codebase. List the columns used in WHERE clauses, joins, and lookups and flag any without an index. Flag queries that select more columns than the calling page or feature uses, and check whether slow query logging is enabled. Propose the specific indexes, query changes, and logging threshold with their tradeoffs, and wait for approval before applying any migration.

More from Engineering Best Practices

Enter world →