---
title: "Compare after the fix | Grafana Labs"
description: "After the fix, compare Duration (avg), Errors, and Calls, and check the plan and the samples."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Compare after the fix

If you have not applied the fix on your database yet, skip this step. When you have, complete the following steps:

1. Open **Queries overview**.
   
   Find the same query you recorded before the fix.
2. Compare key query metrics before and after the change.
   
   - **Duration (avg)** should decrease.
   - **Duration (p99)**: tail latency should improve.
   - **Errors** should not increase.
   - **Calls** should remain stable.
   - **Resource utilization**: CPU and I/O should decrease.
   
   Continue tracking these metrics over time to confirm the improvement holds under varying load.
3. Click the same query.
4. Open the **Explain plan** tab.
5. Verify the index is being used.
   
   Return to the **Explain plan** tab to confirm the database uses the index. Confirm row estimates decreased.
   
   If the plan hasn’t changed after adding an index, update statistics (`ANALYZE` for PostgreSQL, `ANALYZE TABLE` for MySQL) and check again. The estimates can be inaccurate when table statistics are outdated.
6. Open the **Query samples** tab.
7. Verify consistent improvement. Watch for any regression in specific cases.

You compared the query’s metrics, plan, and samples before and after the fix.
