All jobs / Database administrator / Performance

Database administrator interview question · 0–1 years

A developer flags the scan in a code review and asks for an index before merging.

The plan shows a full table scan on a lookup table of about two hundred rows. Problem?

The strongest answer

Almost certainly not — for a tiny table a scan is cheaper than an index seek, so I look at the operators where the actual cost is

Why it works

Exactly — scans are not evil; the planner picks the cheaper path for a table that fits in a few pages.

What a good answer covers

Answers that fall short

Who gets asked this

More Performance questions