explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xTJ7

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.628 ↓ 0.0 0 1

Delete on copier_metrics_meta_data (cost=0.53..93,129,146.53 rows=1,000 width=6) (actual time=0.628..0.628 rows=0 loops=1)

2.          

Initplan (for Delete)

3. 0.001 0.027 ↑ 1.0 1 1

Limit (cost=0.43..0.53 rows=1 width=16) (actual time=0.026..0.027 rows=1 loops=1)

4. 0.026 0.026 ↑ 1,080,000.0 1 1

Index Only Scan Backward using copier_metrics_by_appliance_pkey on copier_metrics_by_appliance copier_metrics_by_appliance_1 (cost=0.43..110,770.37 rows=1,080,000 width=16) (actual time=0.026..0.026 rows=1 loops=1)

  • Heap Fetches: 1
5. 0.627 0.627 ↓ 0.0 0 1

Seq Scan on copier_metrics_meta_data (cost=0.00..93,129,146.00 rows=1,000 width=6) (actual time=0.627..0.627 rows=0 loops=1)

  • Filter: (("timestamp" < $1) AND (NOT (SubPlan 1)))
  • Rows Removed by Filter: 6,000
6.          

SubPlan (for Seq Scan)

7. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..28,343.00 rows=1,080,000 width=4) (never executed)

8. 0.000 0.000 ↓ 0.0 0

Seq Scan on copier_metrics_by_appliance (cost=0.00..18,724.00 rows=1,080,000 width=4) (never executed)

Planning time : 0.343 ms
Execution time : 0.656 ms