Skip to content
About
Main content
Recurring principle

Opacity forfeits optimization

Opacity forfeits optimization.

What it is

Opacity forfeits optimization. Opacity buys generality and gives up optimization, and the forfeited work reappears at a higher layer.

From Storage: Physical Organization › Values, documents, order

Some optimizers perform this inversion for a few known functions. Most do not, for a sound reason: inverting an arbitrary function is generally impossible. The consequence is stark: the simplifier's coverage decides which predicates reach the storage layer at all. Pruning, skipping and pushdown all come after the question "did the predicate survive normalization in a matchable form?" A wrapped column is not a small inefficiency. It silently disables the entire data-reduction machinery for that query.

From Query Planning & Optimization › Folding and sargability

The consequence is severe: your bill becomes a function of physical layout and not of the question you asked. The same query costs different amounts on different days, as the table changes. Two queries with identical meaning differ in price because of the compaction state (how well small files have been merged) of the files underneath.

From Cost Mechanics › Scan pricing

Where it appears

In 3 mechanisms. Each says what the mechanism is about, then how this principle shows up there, in its own words.