explain.depesz.com

PostgreSQL's explain analyze made readable

Result: S6yU

Settings
# exclusive inclusive rows x rows loops node
1. 0.100 6,593.902 ↑ 1.0 10 1

Nested Loop (cost=1.38..22,963.82 rows=10 width=123) (actual time=0.170..6,593.902 rows=10 loops=1)

2. 0.009 6,593.702 ↑ 1.0 10 1

Limit (cost=1.10..22,884.60 rows=10 width=24) (actual time=0.150..6,593.702 rows=10 loops=1)

3. 6,457.723 6,593.693 ↑ 241.8 10 1

GroupAggregate (cost=1.10..5,533,230.51 rows=2,418 width=24) (actual time=0.148..6,593.693 rows=10 loops=1)

  • Group Key: va.violation_id
4. 91.334 135.970 ↑ 545.1 438,290 1

Merge Join (cost=1.10..4,338,691.82 rows=238,902,902 width=39) (actual time=0.027..135.970 rows=438,290 loops=1)

  • Merge Cond: (va2.violation_id = va.violation_id)
5. 6.072 6.072 ↑ 644.3 1,158 1

Index Scan using violation_assets_uindx on violation_assets va2 (cost=0.55..376,641.59 rows=746,046 width=39) (actual time=0.013..6.072 rows=1,158 loops=1)

  • Filter: (state <> ALL ('{20,21,22,23,24,25,26,27}'::integer[]))
  • Rows Removed by Filter: 16
6. 36.000 38.564 ↑ 1.7 438,290 1

Materialize (cost=0.55..378,506.70 rows=746,046 width=16) (actual time=0.010..38.564 rows=438,290 loops=1)

7. 2.564 2.564 ↑ 644.3 1,158 1

Index Scan using violation_assets_uindx on violation_assets va (cost=0.55..376,641.59 rows=746,046 width=16) (actual time=0.007..2.564 rows=1,158 loops=1)

  • Filter: (state <> ALL ('{20,21,22,23,24,25,26,27}'::integer[]))
  • Rows Removed by Filter: 16
8. 0.100 0.100 ↑ 1.0 1 10

Index Scan using violations_pkey on violations v (cost=0.28..7.90 rows=1 width=132) (actual time=0.010..0.010 rows=1 loops=10)

  • Index Cond: (violation_id = va.violation_id)