Your question is Search Optimization for 1M Records. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
How would you optimize this search operation for a dataset of one million records?
Explain how you would assess the current bottleneck, choose an optimization strategy, and validate that it improves performance without compromising correctness. Address implementation sequencing, testing, rollout, monitoring, and trade-offs such as indexing, caching, memory usage, and infrastructure cost.