You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Surfaced by espg's post-#440 demo rerun (2026-08-16): the unindexed polygon-direct build is still record-decode-first β issue #439's inversion was applied only to the stored-index path. Measured on the 555,867-granule ATL03 clone, California AOI, o9:
The live cover runs from the decoded rings rather than the raw WKB column; index_footprints's from_wkbs covers the same 555k footprints in ~32 s vs the ~60 s in-build cover+intersect.
Proposed fix (the #439 ruling extended): the unindexed mortie-backend build becomes build-an-ephemeral-index-and-query-it β cover from the WKB column (from_wkbs, no records), intersect positionally (the same _intersect_footprint_cells machinery, values/offsets in memory), then materialize records for hit rows only via the existing _hit_records. Expected: no-index β the cover cost (~33-35 s at clone scale), and the code path largely unifies with the stored-index plan (one intersection engine; "indexed" = the cover was persisted). Care points carry over from #440: screen-predicate parity (granule_row_mask), total_granules stability, the MultiPolygon superset disclosure (from_wkbs covers all parts β the live path would inherit the index's documented superset semantics, a small behavioral delta vs today's largest-ring cover that must be disclosed like #441's schema note), and the paired-asset exclusion (PR #432's resolution: paired builds stay eager).
π€ from Claude
Surfaced by espg's post-#440 demo rerun (2026-08-16): the unindexed polygon-direct build is still record-decode-first β issue #439's inversion was applied only to the stored-index path. Measured on the 555,867-granule ATL03 clone, California AOI, o9:
index_footprints(9): 32.5 sbuild_wall_s60.9 s + ~26 sgranule_records()outside it)Structurally the no-index build computes the same thing as index-then-query, yet costs ~2.5Γ their sum. Two inherited inefficiencies:
_intersect_mortieconsumes decoded ring coordinates from granule records, sogranule_records()runs over every row before any intersection β the exact pattern Stored-index query path: intersect before materializing granule recordsΒ #439 removed from the indexed path.index_footprints'sfrom_wkbscovers the same 555k footprints in ~32 s vs the ~60 s in-build cover+intersect.Proposed fix (the #439 ruling extended): the unindexed mortie-backend build becomes build-an-ephemeral-index-and-query-it β cover from the WKB column (
from_wkbs, no records), intersect positionally (the same_intersect_footprint_cellsmachinery, values/offsets in memory), then materialize records for hit rows only via the existing_hit_records. Expected: no-index β the cover cost (~33-35 s at clone scale), and the code path largely unifies with the stored-index plan (one intersection engine; "indexed" = the cover was persisted). Care points carry over from #440: screen-predicate parity (granule_row_mask),total_granulesstability, the MultiPolygon superset disclosure (from_wkbscovers all parts β the live path would inherit the index's documented superset semantics, a small behavioral delta vs today's largest-ring cover that must be disclosed like #441's schema note), and the paired-asset exclusion (PR #432's resolution: paired builds stay eager).Refs #439 (the indexed-path inversion, PR #440), #396, #400, PR #432 (paired-build exclusivity).