Skip to main content

plan_read_geo

Estimate the cost of a read_geo query — how many chunks and bytes it would fetch — without reading any data. Useful as a dry-run before a large read.

Signature​

plan_read_geo(uri VARCHAR, [named parameters])

Accepts the same named parameters as read_geo, so the estimate reflects spatial/temporal pruning.

Output​

ColumnTypeDescription
total_chunksBIGINTNumber of chunks the query would fetch.
total_bytesBIGINTEstimated bytes those chunks occupy.

Example​

SELECT total_chunks, total_bytes
FROM plan_read_geo('climate_data.zarr/air_temperature', lat_min := 30, lat_max := 50);
┌──────────────┬─────────────┐
│ total_chunks │ total_bytes │
│ int64 │ int64 │
├──────────────┼─────────────┤
│ 79 │ 39861504 │
└──────────────┴─────────────┘

See also​