Presto query cache discussion
1. Compute a digest of the plan. Clients can then do a conditional execution (similar to a conditional HTTP GET with an etag) so that they could do caching on their own
2. Cache results on Presto side
3. Cache partial queries (say, results or aggregations or anything that could be materialized and saved)
4. Full support for materialized query tables and rewrites
1. Support materialized query result tables
2. Support optimizer rewrites with materialized query result tables
3. Support materialized view and optimizer rewrites
PlanFragmenter
, insert a pair of TableScan
and TableWriter
below Output
.TableScan
has been changedwhen the cached query result contains all rows in the requested plan, we can build filter/aggregation on top of the cached result. The final rewrite is still a equivilant rewrite.