Sampling is a query performance optimization technique that uses a representative sample of data for queries instead of the entire data. This means that you can pick a fraction of the data in your dataset, run queries on that data, and get highly accurate results instead of analysing all the data in it. There are two options available for Sampling.
- Faster Response - when this mode is selected, the system uses a lower sampling rate that provides faster query response time but lower precision of results. This is the default mode used when sampling is enabled.
- Higher Precision - when this mode is selected, the system uses a higher sampling rate that provides higher precision of results but lower query performance.

How does Sampling work in Explorations?
If an Exploration is sampled, every data point in the resulting visualization will have an error bound, which is shown in the tooltip for that data point. This is a 95% error bound, and it is 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 the true value (unsampled) of that data point is between 99 and 101.
To help assess the accuracy of a sampled visualization at a glance, data points with >5% error can be highlighted with red dots. These highlights can be shown/hidden using the "Sampled" indicator in the top right of the visualization.
Contact Analytics to set up sampling in your application.
- Navigate to Settings on the left navigation panel.
- Under Settings, go to the Application section and enable the toggle under Sampling.
- Once this is enabled, you can set the level for Faster Response and Higher Precision.
- Finally, click Save.

Now, you can configure sampling inside an exploration.
- In the visualization module inside explorations, you can configure sampling modes for your exploration by clicking on the lightning icon on top of the exploration.
- From the drop-down that appears, you can choose any one of the 2 sampling modes - Enabled - Faster Response or Enabled - Higher Precision.
- Once this is done, the data sampling will appear in your visualization in the form of green or red dots.
- To hide the errors in the chart, you can click on the Sampled indicator and then click Hide Sample Errors.

Please sign in to leave a comment.