Implement key-based sampling in the planner #16766
We have many ad hoc queries working on large datasets that keep failing/running long time/timing out. So for cases when the user just wants to get a sense of the results, we do smart sampling based on mapping hashes of keys to a percent. When the feature is enabled, we traverse the plan for the query and sample the first integer or string key found (in that order)
We apply the sampling predicate only once in every branch of graph so that eventually all qualifying scans will be sampled.
Test plan - added tests
Fill in the release notes towards the bottom of the PR description.
The text was updated successfully, but these errors were encountered: