Optimize performance with query time sampling in Amplitude Analytics

This article helps you:

  • Understand query time sampling

  • Set query time sampling as the default for all new funnel charts

At times, querying large datasets can be time consuming, resource-heavy, and difficult to execute. Amplitude's query engine can use a technique called query time sampling to optimize performance and reduce execution time.

With query time sampling enabled, Amplitude's query engine selects a representative subset of data—specifically, events based on a randomly selected 10% sample of users—for analysis. It then up-samples the results, using advanced statistical methods like inverse sampling to extrapolate them to the entire population.

Note

Up-sampling is useful for functions that scale with the number of users, such as totals and uniques. Amplitude doesn't use it for functions that don't scale the same way, like average, min, and max. 

Feature availability

This feature is available to users on all Amplitude plans. See our pricing page for more details.

  • Query time sampling is available for Event Segmentation and Funnel Analysis charts only.

Enable query time sampling

To enable query time sampling, follow these steps:

  1. From your Funnel Analysis, click the lightning bolt.

The lightning bolt updates to show the percentage of the data set that the chart queries.

1![testFunnelChart.png](/docs/output/img/charts/testfunnelchart-png.png)
  1. To query the full dataset, click Sampled: 10% to turn off query time sampling.

Set query time sampling as the default

Admin users can set query time sampling as the default for all new charts in a project. To do so, follow these steps:

  1. Click the gear icon to view your organizational settings.
  2. Click Projects.
  3. Choose the project you'd like to modify and switch the Query time sampling toggle to On.

Caveats

Query time sampling can be a useful way to streamline your workflow, but it's important to keep a few things in mind:

  • It may not always be suitable for all types of analyses. These include queries with small datasets, queries that require a high level of granularity, or queries looking for property max, min, or count when the data is highly variable.
  • The following features are unavailable with query time sampling enabled in Amplitude Analytics: create cohorts, set monitors and alerts, scale sampling during data ingestion, and account analysis.
Was this page helpful?

Thanks for your feedback!

September 18th, 2024

Need help? Contact Support

Visit Amplitude.com

Have a look at the Amplitude Blog

Learn more at Amplitude Academy

© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.