MetaLens360Help Center

Save and compare org snapshots

Save Query Amplification snapshots before and after a change, then compare any two — even from different orgs — to prove SOQL and amplification improved.

Updated in Drift detection & comparisons

Overview

A snapshot freezes the results of a Query Amplification analysis for one org: transactions, SOQL counts, duplicate queries, amplification factors and risk levels. Comparing two snapshots shows whether a refactor actually reduced query load — or whether things got worse.

There are two places to work with snapshots:

  • Org Snapshots & Compare (page title All Snapshots) lists every snapshot across all orgs, grouped by cloud and org. Pick any two to compare.
  • QA Intelligence — Snapshot Analysis goes deeper for one org, with Trend Analysis over time and a Snapshot Comparison down to object and component level.

Before you start

  • Run a Query Amplification analysis for the org. See Measure query amplification in trigger chains.
  • Saving and deleting snapshots needs the Create/manage QA snapshots permission. By default every role except Viewer has it. Anyone can view and compare.
  • Each org keeps up to 5 snapshots. Saving a sixth deletes the oldest automatically.

Steps

Save a snapshot

  1. Open Code & Performance Analysis → Query Amplification and run the analysis for your org.
  2. Click Save Snapshot. The button appears once the analysis has results.
  3. In Snapshot label, replace the suggested name with one that says when and why, for example "Before Sprint 45 refactor".
  4. Click Save Snapshot in the dialog.

Compare any two snapshots

  1. Open Manage → Org Snapshots & Compare.
  2. Tick exactly two snapshots. They can belong to different orgs.
  3. Click Compare. The Compare Snapshots dialog labels the older one BASELINE (older) and the newer one TARGET (newer).
  4. Read the table: METRIC, BASELINE, TARGET and CHANGE for Transactions, Total SOQL, Duplicate Queries, Avg Amplification, Critical Risk and High Risk.

Analyze one org in depth

  1. On All Snapshots, click the View / Compare icon next to a snapshot, or click Compare Snapshots on the Query Amplification page.
  2. Use Trend Analysis to see SOQL and amplification across all of the org's snapshots.
  3. Open Snapshot Comparison (it needs at least two snapshots) and choose a baseline and target to see what was resolved, improved or worsened.
  4. Click Cross-Org to compare a snapshot from one org with a snapshot from another.

Example

Before a sprint, Arjun saves "Before Sprint 45 refactor" on acme-uat. After the fix is deployed, he re-runs the analysis and saves "After Sprint 45 refactor". Comparing the two shows Total SOQL down from 412 to 268 and Critical Risk down from 6 to 1 — evidence the change worked.

FAQs

Are these the same as metadata comparisons?

No. Snapshots track query performance metrics. To compare metadata between orgs or branches, see Run a metadata comparison.

Can I keep more than 5 snapshots per org?

No. Delete snapshots you no longer need so the important ones are not rotated out.

Does a lower number always mean better?

For SOQL, duplicates, amplification and risk counts, yes. A change in Transactions usually means the analysis covered a different set of automation.

Troubleshooting

"No snapshots saved yet."

Click Go to Query Amplification, run the analysis and save a snapshot.

The Compare button is disabled

Select exactly two snapshots. The tooltip reads "Select exactly 2 snapshots to compare".

"Save 2+ snapshots to enable"

Snapshot Comparison needs two snapshots for the org. Save another one, or use Cross-Org.

"Baseline snapshot lacks OI data — re-take it to see full before/after."

That snapshot was saved without object-level details. Save a fresh snapshot to get the full comparison.

Saving or deleting a snapshot fails

You may lack the Create/manage QA snapshots permission. See Fix permission denied errors.

Was this article helpful?

Related articles