Query-time Sampling

Querying a large amount of data can sometimes take longer than desired to complete. Query-time sampling allows you to run your query on a 10% subset of your users to reduce the amount of time that query takes to complete.

Set a project-level sample size

By default, Query-time Sampling is set to Disabled at the project level. This means that 100% of users will be queried unless a user toggles on sampling at the query level. Project admins can set queries to sample 10% of users as the default behavior. To do this:

  • Navigate to the General tab under Project Settings.
  • Set Query-time Sampling (under Formats and Defaults) to Enabled.

Specify query sample size

Toggle sampling at the user level

Individual users can toggle Query-time Sampling on and off when executing queries by clicking the lightning icon at the top-right of the query. A filled-in icon means sampling is enabled:

Specify query sample size

When sampling is enabled or disabled at the user level, this setting will persist within a session, but will be reset when changing projects.

Applicable analysis types

Query-time sampling is available in Segmentation, Funnel, and Cohort analyses. Samples can also be applied in the User tool in Event Lookup mode, but but not in User ID or User Segment lookup modes.

Was this page helpful?