Query operators
PostgreSQL currently has 19 query operators.
Seq Scan
The Seq Scan
operator is the most basic query operator. Any single-table query can be carried out using the Seq Scan
operator.
Index Scan
An Index Scan
operator works by traversing an index structure. If you specify a starting value for an indexed column (WHERE record_id >= 1000
, for example), the Index Scan
will begin at the appropriate value. If you specify an ending value (such as WHERE record_id < 2000
), the Index Scan
will complete as soon as it finds an index entry greater than the ending value.
Sort
The Sort
operator imposes an ordering on the result set. PostgreSQL uses two different sort strategies: an in-memory sort and an on-disk sort. You can tune a PostgreSQL instance by adjusting the value of the work_mem
runtime parameter.
Unique
The UNIQUE
operator eliminates duplicate values from the input set. The input set must be ordered by the columns, and the columns must be unique.
LIMIT
The LIMIT
operator is used to...