Glossary · Phase 7 · Software engineering
N+1 query problem
Running one database query for a list, then another for every item in it, instead of one combined query.
Try it now
Most code doesn't need to be fast. Find the bit that does.
Learn it properly
Performance and profiling · Measure before you optimize, then fix the part that matters. About 35 minutes.
Other terms from the same lesson
- LRU cache: A cache with a size limit that throws away the least recently used entry when it's full.
- profiler: A tool that measures how long each part of a program takes, so you fix the slow part instead of guessing.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.