Interview questions
Predict the result, find the errors, explain the solution. You can read the questions without an account.
Topic: IndexesReset all
25 questions
How many rows will a name search return if you remove
LOWER?Predict the resultMiddleWill the table accept a second row with the same primary key?
Predict the resultSeniorFind the bugs: a customer's two most recent orders
Find the errorsJuniorFind the bugs: the latest paid and cancelled orders
Find the errorsMiddleWhat is a database index, and why do we use one?
ExplainJuniorWhy doesn't
LIKE '%abc%'use a regular index?ExplainJuniorHow does the primary key work in ClickHouse?
ExplainSeniorHow many rows does a non-unique index lookup return?
Predict the resultJuniorWhich salaries fall within a
BETWEENrange?Predict the resultJuniorWhich orders match the status and total filters?
Predict the resultJuniorFind the bugs: retrieving items from two orders
Find the errorsMiddleFind the bugs: orders for two customer scenarios
Find the errorsJuniorFind the bugs: Exporting employee records for HR
Find the errorsMiddleHow would you index JSONB searches in PostgreSQL?
ExplainMiddleDoes a foreign key automatically create an index?
ExplainMiddleHow does a unique index handle
NULL?ExplainSeniorWhen is a partial index useful in PostgreSQL?
ExplainMiddleHow does a hash index differ from a B-tree index?
ExplainJuniorHow do data-skipping indexes work in ClickHouse?
ExplainSeniorHow do you diagnose index bloat?
ExplainSenior