Zoltán Borók-Nagy created IMPALA-15842:
------------------------------------------
Summary: COMPUTE_PROCESSING_COST does not count the files a
Parquet scan opens
Key: IMPALA-15842
URL: https://issues.apache.org/jira/browse/IMPALA-15842
Project: IMPALA
Issue Type: Improvement
Components: Frontend
Reporter: Zoltán Borók-Nagy
With COMPUTE_PROCESSING_COST=true, HdfsScanNode.computeScanProcessingCost()
costs a columnar scan as 0.0144 per materialized byte plus 0.0281 per row and
conjunct. Opening each file and processing its footer is not counted:
ScanNode.rowMaterializationCost() has a per-scan-range term
(scan_range_cost_factor), but HdfsScanNode overrides
computeScanProcessingCost() and never uses it. A scan over many files that
returns few rows, or reads few columns of a wide schema, gets one instance per
node.
Example on master, 6 executors with 32 vCPU: an Iceberg table with 224M rows,
2,000 columns and 14,600 Parquet files of about 9 MB with about 600 KB footers.
{{SELECT MAX(cpd_date) FROM t}} (a partition key scan: one footer-only range
per file) costs 2,102 and runs one instance per node. It takes 7.2 s, with 34
CPU-s of FooterProcessingTime; with MT_DOP=8 (48 instances) it takes 1.1 s. A
query that uses it as a 7-day cutoff takes 13.2 s with COMPUTE_PROCESSING_COST
and 3.9 s with MT_DOP=8; its main scan gets 18 instances instead of 48 for the
same reason. Over 50 queries on this schema, COMPUTE_PROCESSING_COST is 33%
slower than MT_DOP=8 (130 s vs 98 s).
Could the columnar scan cost include a per-file term, scaled by the footer size
or by the number of columns in the file schema?
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)