liveBook · Manning

Query planning

As explained in Architecting an Apache Iceberg Lakehouse

Query planning is the process of determining an execution strategy for a query, including which files or partitions must be read.

Query planning determines an efficient execution strategy, including which files or partitions a query must read. In Iceberg, metadata, snapshots, partition transforms, and file statistics guide pruning while preserving time travel and partition evolution. section 1.6 section 5.3.1

Planning improves performance and operational control through several mechanisms:

  • Applies hidden partition transforms to filters on ordinary columns, pruning relevant partitions without exposing partition keys in the schema. section 2.6.4
  • Uses Parquet footer and row-group statistics to skip unnecessary data and read only the required columns. section 5.3.1
  • Enforces locality and access policies during planning, while logging queries, masking data, and tracking snapshots for auditability. section 9.5.6

Filtering timestamped events

A query filtering event_timestamp can use hour- or day-based hidden partitions even when it does not mention a partition column. Iceberg identifies relevant partitions and prunes files without changing the logical schema. section 2.6.4

Healthcare data locality

A region-aware catalog and Dremio enforce locality policies during planning for Iceberg tables partitioned by geography and department, while Power BI and JupyterHub consume controlled datasets. section 9.5.6

Figure 5.8 Using metadata in Parquet row-group footers, we can tell which row groups to scan and which to skip for faster reads.

Shows how Parquet row-group footer metadata identifies data to scan and data to skip. section 5.3.1

How Architecting an Apache Iceberg Lakehouse covers it

How deep it goes
Explains partition transforms, snapshots, file metrics, and row-group statistics, but stops short of engine-specific planning algorithms.
Examples
Demonstrates timestamp filtering, Parquet row-group skipping, and region-aware healthcare queries across dashboards and research notebooks.
What it assumes
Assumes familiarity with queries, partitions, metadata, and lakehouse storage while illustrating their interaction through Iceberg and Parquet.
What you can do after
Diagnose/debug with it by relating query filters, partition transforms, file statistics, locality policies, and unnecessary scans.
How it connects
Connects query planning with Apache Iceberg, hidden partitioning, partition pruning, Parquet, predicate pushdown, snapshots, and data governance.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Architecting an Apache Iceberg Lakehouse. The section links point to the parts of the book it draws on.