explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Xw6Z

Settings
# exclusive inclusive rows x rows loops node
1. 421.469 8,634.161 ↓ 0.0 0 1

Merge Join (cost=75,653.84..307,564.51 rows=12,443,688 width=12) (actual time=8,634.161..8,634.161 rows=0 loops=1)

  • Output: atdc.transaction_id, atmc.metric_id, atdc.object_id
  • Merge Cond: (atdc.object_id = atmc.object_id)
  • Buffers: shared hit=364866, local read=13683
2.          

CTE atmc

3. 3,594.243 7,322.648 ↑ 11.8 11,431 1

Hash Join (cost=1.81..61,421.98 rows=135,250 width=8) (actual time=0.198..7,322.648 rows=11,431 loops=1)

  • Output: atmc.metric_id, rc.object_id
  • Hash Cond: (rc.metric_id = (atmc.metric_id + 1))
  • Buffers: shared hit=1, local read=13683
4. 3,728.316 3,728.316 ↑ 1.0 3,092,311 1

Seq Scan on pg_temp_3.tmp_res_cur rc (cost=0.00..44,606.11 rows=3,092,311 width=8) (actual time=0.055..3,728.316 rows=3,092,311 loops=1)

  • Output: rc.metric_id, rc.object_id
  • Buffers: local read=13683
5. 0.043 0.089 ↓ 1.5 33 1

Hash (cost=1.54..1.54 rows=22 width=4) (actual time=0.089..0.089 rows=33 loops=1)

  • Output: atmc.metric_id
  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
  • Buffers: shared hit=1
6. 0.046 0.046 ↓ 1.5 33 1

Seq Scan on castoncast_central.aed_tran_crit_metrics atmc (cost=0.00..1.54 rows=22 width=4) (actual time=0.006..0.046 rows=33 loops=1)

  • Output: atmc.metric_id
  • Filter: (atmc.snapshot_id = 91)
  • Rows Removed by Filter: 10
  • Buffers: shared hit=1
7. 822.549 822.549 ↑ 3.3 364,854 1

Index Scan using aed_transactions_details_idx on castoncast_central.aed_transactions_details atdc (cost=0.00..42,273.00 rows=1,192,938 width=8) (actual time=0.019..822.549 rows=364,854 loops=1)

  • Output: atdc.transaction_id, atdc.object_id, atdc.result_count, atdc.snapshot_id
  • Filter: (atdc.snapshot_id = 91)
  • Rows Removed by Filter: 2236
  • Buffers: shared hit=364865
8. 32.229 7,390.143 ↑ 11.8 11,431 1

Sort (cost=14,231.86..14,569.99 rows=135,250 width=8) (actual time=7,376.972..7,390.143 rows=11,431 loops=1)

  • Output: atmc.metric_id, atmc.object_id
  • Sort Key: atmc.object_id
  • Sort Method: quicksort Memory: 920kB
  • Buffers: shared hit=1, local read=13683
9. 7,357.914 7,357.914 ↑ 11.8 11,431 1

CTE Scan on atmc (cost=0.00..2,705.00 rows=135,250 width=8) (actual time=0.204..7,357.914 rows=11,431 loops=1)

  • Output: atmc.metric_id, atmc.object_id
  • Buffers: shared hit=1, local read=13683