← Graph

Common Table Expression

concept 1 connections

SQL feature (PostgreSQL ≥ 8.4) letting you name an intermediate query with a WITH clause and reference it in the main query. Used in the lightning talk to pre-compute a virtual table of average product ratings before joining to products — two-thirds the time of the classic query but not faster than the classic query once filtering is applied because averages for the whole table are still computed up front.

category
pattern
about
Common Table Expression concept
Compares CTE against classic SQL and LATERAL for top-rated products query.

Provenance

Read by
6 extractions