Observe Performance Cookbook: Use Approximate Values When Feasible

Problem

Working in a worksheet or explorer using distinct counts, time frames, or statistical operations is slower or uses more credits than expected.

Solution

Edit the OPAL and look for terms ending in _exact. Remove _exact and test that the use case still works, then save the change.

Explanation

The frame_exact, count_distinct_exact, and median_exact OPAL functions are used to provide highly accurate versions of frame, count_distinct, and median. For instance, using frame instead of frame_exact allows the frame window to deviate from the configured value by a small amount (1/120 of the total frame size or 10s, whichever is larger). However, it enables some powerful rewrites (by bucketizing data and sharing the bucketized data between multiple frames) for window functions and aggregation verbs.