Tech_Interview_Prep

Indexing & Query Performance

Why some queries are instant and others scan the whole table — and how an index (usually a B-tree) changes that.

Q1.What is the main trade-off of adding an index to a table?

Q2.What is the default underlying data structure most relational databases use for a standard index?

Q3.For a composite index on `(a, b, c)`, which query can efficiently use the index?

Q4.What does `EXPLAIN` (or `EXPLAIN ANALYZE`) show you?