Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
Currently, we do not expose stats over ROW__ID.writeId to the optimizer (this should be fixed by HIVE-20313). Even if we did, we always assume uniform distribution of the column values, which can easily lead to overestimations on the number of rows read when we filter on ROW__ID.writeId for materialized views (think about a large transaction for MV creation and then small ones for incremental maintenance). This overestimation can lead to incremental view maintenance not being triggered as cost of the incremental plan is overestimated (we think we will read more rows than we actually do). This could be fixed by introducing histograms that reflect better the column values distribution.
Till both fixes are implemented, we will use a config variable that will set the selectivity for filter condition on ROW__ID during the cost calculation. Setting that variable to a low value will favour incremental rebuild over full rebuild.
Attachments
Attachments
Issue Links
- is superceded by
-
HIVE-20382 Materialized views: Introduce heuristic to favour incremental rebuild
- Closed
- relates to
-
HIVE-20313 consider making ROW__ID a 1st class object
- Open
- links to