AiTeky Original Interactive Learning & Practice Intermediate
Enterprise SQL: seek versus scan and the function that disabled the index
Count how many rows an index seek reads against a full scan, see how wrapping a column in a function turns a seek into a scan, and rewrite a month-end report's filters so they can use the index again.
An index only helps when the database can seek into it. A small change to how a filter is written, such as wrapping a column in a function, can silently turn a millisecond lookup into a scan of every row. The query still returns the right answer, only much more slowly.
This course models an index and a scan with small Python programs you can run in your browser. Python stands in for the database: the rows examined are counted, not timed, and the counts are what separate fast from slow. Check your database's documentation for execution plans, function-based indexes and statistics. All data is made up.
- Learn lessons explain one idea at a time and let you run it.
- Industry ready lessons decide and justify, and end with interview questions.
No SQL tuning experience is assumed. Basic Python helps.
- ▶ Run code in your browser. Nothing to install
- ✓ Exercises that check themselves
- 📖 Tap a word to see what it means
Locked. Sign up free
Learn
Understand each idea with everyday examples. No coding background needed.
- 01 20 min Free sample 🔒 AiTeky Pass Seek and scan Count the rows examined when finding 31 days of orders by reading every row, and when jumping straight into a sorted index.
- 02 20 min 🔒 AiTeky Pass The filter that cannot seek See how wrapping a column in a function forces a scan, and how rewriting the same filter as a plain range lets the index do its job.
Industry ready
Real problems from real jobs, and the questions interviewers ask about them.

