Question library
Questions from real interviews. Drill any of them by voice in a couple of minutes, with an interviewer, a score and feedback.
What is a database index, and how does it speed up queries?JuniorYou're told that one database query has started running very slowly. How would you look for the cause?JuniorA query that used to run in milliseconds now takes seconds after the table grew to tens of millions of rows. How would you investigate, and what can you do about it?Mid-levelУ нас есть таблица заказов на сотни миллионов строк и составной B-tree индекс по (user_id, created_at). Расскажите, как устроен такой индекс внутри и как база по нему выполняет запрос «последние 20 заказов пользователя». А если в запросе фильтр только по created_at — индекс поможет?Mid-levelIn production, a query against a 200-million-row orders table suddenly started taking seconds instead of milliseconds. How would you investigate, and what can you do with indexes?Senior