Query Bytes Scanned Calculator

July 20, 2026

Query Bytes Scanned Calculator

Estimate bytes scanned per query, monthly scanned terabytes, savings from columnar formats and pruning, cache impact, and bytes cap risk for analytics workloads.

⚡Analytics Query Presets
🧮Scan Inputs
Logical uncompressed table size before scan reductions.
Columnar formats can skip unneeded columns and row groups.
100% is SELECT star or a query that touches most columns.
Rows that match after WHERE predicates, before format skipping.
Percent of partitions skipped by date, tenant, region, or bucket filters.
3.5 means data is stored at about 1 / 3.5 of logical size.
Dashboard refreshes, scheduled jobs, and ad hoc runs combined.
Result, metadata, block, or warehouse cache that avoids billed scanning.
Set 0 for no cap warning.
Used to tune cache and row-group skipping expectations.
Bytes Scanned / Query
0 GB
after format, pruning, filters, compression, and cache
Monthly Scanned
0 TB
for the entered query count
Columnar + Pruning Reduction
0%
versus full compressed table scan
Cap Status
OK
within bytes cap
Cap utilization will appear after calculation.
Run a calculation to see cap warnings and optimization notes.
Logical table size0 TB
Partitions remaining after pruning0%
Format column read factor0%
Row filter skip factor0%
Physical bytes before cache0 GB
Cache avoided scan0 GB
Engine assumptionAthena / Trino style
📁File Format Scan Factors
CSV
Full row text scan
JSON
Semi-structured scan
Parquet
Column + row groups
ORC
Column + stripes
🧾Format Comparison Table
FormatColumn SkippingPredicate SkippingTypical CompressionScan Notes
CSVVery lowNone or minimal1.0x to 2.5x with gzipUsually scans full files even for few columns.
JSONVery lowLow1.5x to 4x with gzipFlexible, but parsing overhead is high for analytics.
ParquetHighHigh with stats2x to 8xStrong default for Athena, Trino, Spark, DuckDB, and warehouses.
ORCHighHigh with stripes2x to 8xOften excellent for Hive-style data lakes and heavy scans.
🏁Engine Comparison Grid
EngineBytes MetricPruning StrengthCache BehaviorBest Guardrail
Athena / TrinoData scannedPartition and column pruningLimited result reuse by setupWorkgroup bytes scanned cutoff
BigQueryBytes processedPartition, cluster, column pruningResult cache can avoid billingMaximum bytes billed
SnowflakeMicro-partitions readMicro-partition pruningResult and warehouse cacheWarehouse size plus query limits
Spark SQLInput bytes readPartition, column, stats filtersMemory or disk cache if persistedJob alerts and file layout checks
DuckDBFile bytes read locallyParquet pushdown is strongOS and process cacheLocal disk and memory ceiling
💡Scan Reduction Tips
Partition for the first WHERE clause. Date, tenant, region, and environment filters often remove more bytes than any single SQL rewrite.
Prefer columnar files for recurring analytics. Parquet and ORC enable the engine to read only referenced columns instead of parsing every field.
Keep file sizes query-friendly. Many tiny files add planning overhead, while very large files can reduce parallelism and skip precision.
Use bytes caps for exploration. Cap ad hoc work before giving analysts access to raw event or log tables.

Plug in your filtering strategy and your table size into the calculator above. The calculator will do the work for you so you don’t have to guess about whether or not your partitioning scheme work. Before diving into the reason that inputs matter, we should explore what happens when you put pressure on different formats.

When you run analytics on CSV files, you pay for each character in every row. Even if you only need customer ID column, you’re still paying for every character because there’s no internal structure to skip any data. CSV is just a text format it reads left to right and top to bottom regardless of your intentions.

How to Save Money on Data Scans

But then there’s how queries work, and when you switch to columnar formats such as ORC or Parquet, it flip everything on its head. Columnar stores saves each column separately, so the engine can skip over all unneeded ones. So if you have a table with fifty columns in it, but your report requires only three, maybe a columnar scan will touch just one percent of data consumed by a row-based format. And that’s the first big lever for controlling costs. Tweak the columns percentage in the calculator and you’ll see how that reduce the workload. Drop it from a hundred down to twenty, and you’re modeling exactly what these new data warehouses promise: greater efficiency.

Half the problem is column skipping. The other half is row filtering, which rely a lot on how your data is clustered and partitioned. To partition your table means that you’ve split it into manageable chunks (e.g., by date or by region) so you can slice and dice it as needed. When you ask for last month’s sales in Europe, you want the engine to skip over all the files from January-December (except November), and you don’t care about Asia/Americas at all. If not pruned, the engine will scan the entire dataset looking for a single piece of information.

It gets more realistic when you factor in things like compression ratio and cache hits as inputs. Compression reduces physical file size, reducing the number of bytes that flows through the CPU pipelines and over the network. With a good compression ratio you may have a big logical table (on paper), but it fit into a reasonable amount of space when scanned.

A cache hit represent the best case scenario. It keeps frequently used blocks in memory or remembers results from a previous calculation. Having a high cache hit rate is akin to paying for storage instead of compute.

A lot of teams discover the byte cap way too late, it’s a danger zone. To keep their accounts from going broke by runaway jobs, most cloud providers lets you specify a maximum number of bytes that can be returned in each query. Getting close to that cap feels like yanking on the emergency brake while driving downhill, it puts an end to the bleeding, but it also brings everything to a stop. If you’re finding yourself repeatedly bumping against the cap, your data model is broken different than your SQL skills. You should of checked earlier.

The calculator has a cap status check because getting close to the cap is like coming up against the wall at top speed. We don’t want anyone to do that.

Scanned bytes are a matter of being disciplined about data architecture. They makes you consider what people will want to do with it ahead of time. They make you think about access patterns when you’re ingesting stuff. Partition on date if people often filter by date. Drop/archive seldom-used columns. Minimize the database engine’s behind-the-scenes work. Make your query habits match your storage structure. Costs drops automatically. You trust the numbers instead of worrying about the bill.

Query Bytes Scanned Calculator

Related posts

Leave a Comment