This dashboard is slow because we ___ an expensive query on every load.
You run a query (or execute a query) against a database. This is the core collocation: "run a SELECT", "the query runs in 200ms". "Drive", "do", and "play" do not pair with "query" in technical English. Saying you "run a query" is instantly clear, and "execute" is its more formal synonym used in driver documentation and ORM guides.
2 / 5
To make it faster, we should ___ the query and add an index.
To optimise a query means to rewrite or tune it so it runs faster and uses fewer resources. It is the standard phrase: "optimise the join", "the query was optimised by the planner". "Better", "fix up", and "perfect" are not idiomatic. Optimise pairs with queries, indexes, and performance, and signals deliberate performance work rather than a casual change.
3 / 5
We can speed up lookups if we ___ an index on the email column.
You build an index (or create an index) on a column to speed up reads. "Build an index" is common when emphasising the work the database does: "building the index took ten minutes". "Grow", "make up", and "raise" do not collocate here. Knowing build/create an index lets you discuss the main lever for query performance accurately and confidently.
4 / 5
This report needs to ___ the orders and customers tables.
To join tables means to combine rows from two or more tables based on a related column. This is fundamental SQL vocabulary: "join orders on customer_id". "Mix", "glue", and "stick" are not used. Join also acts as a noun (an inner join, a left join), so mastering the verb-and-noun pair is essential for talking about relational queries.
5 / 5
If the operation fails midway, we must ___ the transaction.
To roll back a transaction means to undo all its changes so the database returns to its previous consistent state. It is the precise collocation: "the transaction rolled back on error". "Undo", "reverse out", and "turn back" are not the technical term. Its counterpart is commit a transaction. Using roll back shows you understand atomicity and error recovery in databases.