Warehouse Storage
Manage storage in Statsig Warehouse Native, including where intermediate datasets live in your warehouse and how to control object lifetimes and costs.
How warehouse storage works
Statsig uses its sandbox in your warehouse to cache intermediate tables and result tables. Caching enables incremental reloads (without recalculating metrics for every day of the experiment on each load) and allows you to use these tables for ad-hoc analysis.
Statsig stores tables in the sandbox schema or dataset you configured. You can use this location to track storage footprint and manage permissions.
Conventions and usage
Statsig shards tables by entity ID. For example, the experiment early_user_journey_acceleration has that identifier in its associated table names for scorecard loads. This naming convention is a reliable way to look up tables for a given experiment.
Statsig writes to special tables that appear in metric sources or assignment sources:
- pipeline overview: performance statistics for the jobs Statsig runs
- statsig_forwarded_events: events logged through statsig.log_event
- statsig_forwarded_exposures: exposures from experiments, gates, autotunes, and holdouts
- statsig_forwarded_switchback_exposures: switchback-formatted exposures
- statsig_daily_results: rendered results with statistics like p-value
Some of these tables have pre-set names; others you configure in data connection settings.
Many users ingest these tables as part of internal pipelines. Statsig regularly updates data in these tables, and in some cases backfills up to several days when data delays or repairs occur. To prevent mutable data from causing issues, configure lookback windows.
Exposures don't necessarily deduplicate. Fast-forwarded exposures duplicate records from daily exports, and Statsig retains only 30 days of history for warehouse native projects. After 30 days, Statsig treats a given unit's exposure as new and re-exports it.
Volume
Scorecard loads generate a varying number of tables depending on the number of metric sources accessed and the types of metrics loaded. Statsig may also materialize intermediate tables before or after large operations, which reduces compute cost.
This process can produce a large number of artifacts. Customers running 300+ experiments have encountered default quota limits on vendors like Databricks. You can address quota limits by requesting a quota increase or configuring the TTLs described in the Management section.
Management
Statsig records every table it creates in your sandbox, and an hourly cleanup job drops each table after it expires:
- Temporary tables that Statsig builds while running a job expire 1.5 days after Statsig creates them.
- Transient datasets, such as tables for Explore queries and power analyses, expire 3 days after Statsig creates them, unless you configure a different TTL.
- Other tables have no expiry by default. They stay until you drop them from the experiment, or until a TTL you configure expires them.
To configure TTLs per table type, go to your project's data connection settings and open Set Warehouse Artifacts TTL.
How TTLs work
Statsig records a table before the job that writes it runs, and again after the job succeeds. Tables from failed or canceled jobs get an expiry too, so they don't stay in your sandbox.
When a job writes a table, Statsig schedules its deletion at the current time plus the TTL for that table's type. For example, if Statsig writes a result table on 2024-06-01 and you configure Result Datasets with a 14-day TTL, Statsig schedules the deletion for 2024-06-15.
Each incremental or metric reload also pushes out the deletion of the staging and result tables its experiment or gate owns, whether the reload rewrites them or only reads them. If a reload on 2024-06-07 uses that table, Statsig moves the deletion to 2024-06-21. Tables for an experiment you keep reloading don't expire. They expire one TTL after the last reload that uses them.
A TTL change doesn't change the deletion date of existing tables. The new TTL applies the next time a reload of the relevant experiment runs.
Types of tables for TTL
Result Datasets: the Pulse result tables Statsig creates at the end of an experiment or gate reload, containing aggregated group-metric level data. These are generally small (1 row per metric/day/group/dimension) and useful for post-hoc analysis.Intermediate Tables: all other tables Statsig writes to during an experiment reload. These can be large because they contain user-level data. Statsig reuses them for incremental and metric reloads.Transient Datasets: tables created for one-off queries, most commonly Explore queries, power analyses, and stratified sampling. By default, Statsig drops these 3 days after creating them, unless you configure a different TTL.
Temporary tables that Statsig builds as a performance optimization while creating Intermediate Tables always expire after 1.5 days. TTL settings don't change them.
If you don't set a Result Datasets TTL, result tables use the Intermediate Tables TTL instead (or the Transient Datasets TTL for Explore queries). Setting only an Intermediate Tables TTL also deletes your result tables. To keep result tables longer, set a Result Datasets TTL too. Statsig treats a Result Datasets TTL of 0 as unset.
Explore query dependencies: Explore queries rely on permanent staging tables. These tables reduce the need to recompute data for analysis the scorecard run already performed. Unlike results tables (which Statsig caches locally on its servers), you must maintain permanent staging tables in your warehouse for Explore queries to function. Maintaining these tables avoids reprocessing large volumes of data that may contain PII or other sensitive information.
Drop an experiment's tables
When you make a decision on an experiment, Statsig prompts you to drop its tables. You can also drop them at any time from the experiment's menu. By default, Statsig keeps the result tables, which are small, for reference.
Statsig sets the experiment's tables to expire 12 hours later, and the hourly cleanup job drops them. A reload of the experiment during those 12 hours keeps the tables, so drop tables after the experiment's last reload.
Clean up older leftover tables
Earlier versions of Statsig didn't record every table they created. For example, some intermediate tables on Athena and tables from failed jobs weren't recorded. Those tables have no expiry, and the cleanup job doesn't drop them.
If your sandbox holds tables Statsig no longer uses, contact Statsig support. Statsig compares a list of the tables in your sandbox with its own records and sends you the list of tables it would drop. After you approve the list, the hourly cleanup job drops them. Statsig doesn't drop tables that changed recently.
You can also remove leftover tables yourself with your own cleanup job.
Building your own cleanup job
The safest deletion rule is per-experiment, not per-table-type: only delete tables belonging to experiments that have concluded. When matching tables to an experiment by name, match against your full experiment list rather than one loose pattern per experiment (a substring match like %my_experiment_v1% also catches my_experiment_v10), and note that hyphens in experiment names become underscores in table names.
- Statsig doesn't write experiment status to any table in your warehouse. To check whether an experiment has concluded programmatically, use the Console API's List Experiments endpoint (
GET /console/v1/experiments). Each experiment has astatusofsetup,active,decision_made,abandoned, orarchived; treatdecision_made,abandoned, andarchivedas concluded. - Don't delete tables for an experiment that still has a scheduled reload, even if its allocation window has ended. Scheduled reloads depend on existing staging tables and fail until a full reload recreates them.
- Deleting conservatively is recoverable. Statsig caches the results shown in the console, and dropping staging tables doesn't affect them. If you later need Explore or a re-analysis on a concluded experiment, a full reload recreates its tables.
- Never delete the special tables listed in Conventions and usage, under the names configured in your data connection settings. Project TTLs never delete these tables, but your cleanup job should exclude them explicitly.
Troubleshooting storage issues
Missing data errors
Warehouse Native users may encounter TABLE_OR_VIEW_NOT_FOUND errors when required data tables are missing from the warehouse. These errors typically occur when:
- Permanent staging tables have been dropped: Explore queries and advanced analysis require permanent staging tables, not results or transient staging tables.
- TTL settings have expired tables: Statsig automatically cleans up tables with configured time-to-live (TTL) settings.
- Incomplete data loads: Initial experiment setup or data pipeline issues may prevent table creation.
Resolution steps
For missing staging tables: missing permanent staging tables require a full reload to recreate the staging dataset.
For general missing tables:
- Check your warehouse's TTL settings in the data connection configuration.
- Verify that permanent staging tables exist in your configured sandbox schema.
- If you manually dropped tables, trigger a full data reload.
- Contact support if tables are still missing after reload, or if you didn't drop them.
Storage dependencies
Warehouse Native uses several types of tables with different storage patterns:
- Permanent staging tables: required for Explore queries and advanced analysis.
- Transient staging tables: short-lived tables that Statsig drops automatically, after 1.5 days for temporary tables and 3 days by default for Explore queries and power analyses.
- Results tables: output statistics from the pipeline, copied and cached locally on Statsig servers.
Vacuum jobs don't affect staging tables used by Statsig.
Was this helpful?
For AI agents: a documentation index is available at /llms.txt. Append .md to any page URL for markdown, or send Accept: text/markdown.