sortkey
A sortkey is a term used in database and data warehouse systems to denote one or more columns whose values determine the physical or logical order of rows. By arranging data according to a sort key, systems can accelerate range scans, skip non-matching blocks, and improve compression, thereby speeding queries that filter or group by the key.
In practice, sort keys appear as properties of a table or index. In columnar data warehouses such
Usage considerations include choosing sort keys based on prevalent query patterns. A well-chosen sort key improves
Related concepts and variants include sort order, index keys, and clustering keys. Some systems offer automatic