Skip to content

Iceberg scan planning reads every manifest, serially, on every filtered query (no partition pruning, no cached file list under a filter) #2240

Open

Description

@aaj3f

Problem

A query with a pushed filter over an Iceberg graph source re-reads the manifest list and every manifest on each run, one after another. Partition summaries are parsed but never used to skip manifests, so a selective filter on a partitioned table (say FILTER(?region = "EU") over a table partitioned by region) pays the full planning cost every time. Unfiltered scans of the same snapshot already use a cached file list.

Expected

  • Manifests whose partition summaries exclude the filter are skipped.
  • A snapshot's file list is immutable, so it's read once and pruned in memory for each filter.

Where (at ca682e2b8)

  • fluree-db-iceberg/src/scan/pruning.rs:32-66: can_contain_partition returns true for every column predicate and has no callers.
  • fluree-db-iceberg/src/scan/send_planner.rs:138 and planner.rs:317-326: manifests are read with sequential awaits.
  • fluree-db-api/src/graph_source/r2rml.rs:4123-4157: the if let Some(filter) branch calls plan_scan_for_snapshot on every query, although CachedScanFiles.data_files (cache.rs:33-45) already carries each file's bounds.

Possible direction

  • With a filter present, take the cached unfiltered DataFile list and apply can_contain_file in memory.
  • Implement identity-transform partition pruning against ManifestListEntry.partitions, then bucket/day transforms.
  • Read manifests concurrently.

Related: #1910.

Activity

  1. added
    P3
    area:iceberg
    performance
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3area:icebergperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions