🗒 Cheat Sheet← Lesson
BitWithBite
SQL Worksheet

🗃 Indexes, Views & Performance

Chapter: SQL · Level ★☆☆ · Time: 30 min
SCORE___ / 20
NameClassDate
After this worksheet you can
Speed lookups with indexesKnow index trade-offsCreate viewsRead EXPLAIN basics

🧠 Section A · Concept Check ● BEGINNER 4 × 1 = 4

1An index speeds up:
2Indexes cost:
3A view is:
4See a query plan with:

🧮 Section B · Problem Solving ● INTERMEDIATE 2 + 3×3 = 11

5CREATE idx_email ON users(email);
6Primary keys are indexed .
7Index the orders.user_id column.
8Create a view of active users.
9When would you NOT add an index?

🚀 Section C · Challenge ● CHALLENGE 5

10What does EXPLAIN tell you?
💭 Reflection — the most useful thing I learned:
A ___/4   B ___/11   C ___/5   Total ___/20 Teacher's Signature Parent's Signature
✂ answer key — fold or cut before handing out

1-A   2-A   3-A   4-A  |  5 INDEX   6 automatically   7 = CREATE INDEX idx_orders_user ON orders(user_id);   8 = CREATE VIEW active_users AS SELECT * FROM users WHERE active = 1;   9 = Small tables or write-heavy columns rarely searched  |  10 = How the engine executes the query (index used, rows scanned)

📄 Need offline practice?Download the print-ready PDF or open the one-page cheat sheet.
⬇ Worksheet PDF 🗒 Cheat Sheet