Sampling is a query performance optimization technique that uses a representative sample of data for queries instead of the entire dataset. You can pick a fraction of the data in your dataset, run queries on it, and get highly accurate results instead of analyzing all the data in it. There are two options available.
- Faster Response – When you select this mode, the system uses a lower sampling rate that provides faster query response time but lower precision of results. This is the default mode when you enable sampling.
- Higher Precision – When you select this mode, the system uses a higher sampling rate that provides higher precision of results but lower query performance.
Sampling in explorations
If an exploration is sampled, every data point in the resulting visualization has an error bound, which is shown in the tooltip for that data point. This is a 95% error bound, a percentage of the data point. For example, if the data point's value is 100, and the error bound is 1%, then there is a 95+% chance that that data point's true value (unsampled) is between 99 and 101.
To help assess the accuracy of a sampled visualization at a glance, you can highlight data points with >5% error with red dots. The sampled indicator shows or hides these highlights.
Contact Optimizely Support to set up sampling in your application.
- Go to Settings > General Settings > Sampling.
- Enable the Enabled toggle under Sampling.
- Enable the Always Highlight High Errors toggle to see high errors.
- Set the High Error Limit and the JSON Indexing Sampling Rate, which is the percentage of events or rows sampled to determine the structure of JSON data during indexing.
- Set the Faster Response and Higher Precision level.
- Click Save.
Now, you can configure sampling inside an exploration.
- Click the lightning icon in the visualization module within explorations to configure sampling modes for your exploration.
- Choose one of the two sampling modes: Enabled – Faster Response or Enabled – Higher Precision.
The data sampling displays as green or red dots in your visualization. - Click the Sampled indicator and then Hide Sample Errors to hide the errors in the chart.
Please sign in to leave a comment.