Reading performance & plans
Concept  ·  SQL & Querying

On a columnar engine, projection is the bill — SELECT * scans every column (bridge to scanned-bytes).

In a columnar store each column is its own compressed stream, so cost scales with columns touched × rows scanned — projection is the free lunch, and * declines it (on wide tables, by 10–100×). The damage compounds: * inside views drags every column through every layer; * into an INSERT is the insert_select_position time bomb; * breaks when schemas evolve. COUNT(*) reads no column data — the asterisk there is notation.

See it break
tele
custplancity
c1proRome
The trap
SELECT
  *
FROM
  tele
WHERE
  plan = 'pro';
The fix
SELECT
  city
FROM
  tele
WHERE
  plan = 'pro';
The trap
c1proRome
The fix
Rome

The two-column telemetry question read every column — on a columnar engine SELECT * scans all three column streams to answer what one (city) needed; naming the column projects only it.

The rule

Name the columns; * EXCLUDE(...) where supported; read the scan node's projection list as the ten-second audit.

Shows up elsewhere
Reading a plan for two smellsINSERT ... SELECT column position
Try one →Prove it in practice →