set-based query

A single query that works on a whole set of rows at once, instead of code that loops and queries row by row.

In more detail

Joins, aggregates and window functions let the database do in one statement what a loop would do with many queries. That cuts round trips and lets the planner choose an efficient route.

Related terms

Taught in

References