ColumnProjectionScenario
Data scenarios · Implementation: mlsysim/engine/scenario_definitions/data.py.
Construct this scenario with keyword inputs. The fields below show the types and defaults declared by this class.
A model that uses columns_used of columns_total equal-size columns, read from a row or a columnar file.
Notes
Equation: selected fraction = used columns / total columns; ideal speedup = 1 / selected fraction.
Assumptions: Columns have equal byte sizes and unused columns can be skipped completely.
Excludes: Predicate selectivity, decompression overhead, row-group metadata, and measured end-to-end speedup.
References
Derivation: selected fraction = used columns / total columns; ideal speedup = 1 / selected fraction. The individual properties state units and intermediate accounting; this class introduces no fitted coefficient.
Examples
The named scenario supplies illustrative inputs; the output is calculated.
>>> from mlsysim import Scenarios
>>> case = Scenarios.FraudModelColumnProjection
>>> round(float(case.read_fraction), 3)
0.2Attributes
| Name | Description |
|---|---|
| columns_total | |
| columns_used | |
| read_fraction | Fraction of equal-size columns that a projection needs to fetch. |
| speedup | Ideal I/O speedup from projection, reciprocal of the selected-column fraction. |
| wasted_fraction | Fraction of row-scan bytes discarded because their columns are unused. |
columns_used
Type: int.
Declared default: required.
columns_total
Type: int.
Declared default: required.
read_fraction
engine.scenario_types.ColumnProjectionScenario.read_fraction
Fraction of equal-size columns that a projection needs to fetch.
Equation: return columns_used / columns_total.
wasted_fraction
engine.scenario_types.ColumnProjectionScenario.wasted_fraction
Fraction of row-scan bytes discarded because their columns are unused.
Equation: return 1 - read_fraction.
speedup
engine.scenario_types.ColumnProjectionScenario.speedup
Ideal I/O speedup from projection, reciprocal of the selected-column fraction.
Equation: return 1 / read_fraction.