explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FauE : query list

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 49.214 ↑ 93.0 2 1

Hash Join (cost=11,753.77..22,902.19 rows=186 width=113) (actual time=37.054..49.214 rows=2 loops=1)

  • Hash Cond: (c.event_id = cet.id)
2. 0.013 49.138 ↑ 93.0 2 1

Hash Left Join (cost=11,748.35..22,890.69 rows=186 width=99) (actual time=36.979..49.138 rows=2 loops=1)

  • Hash Cond: (c.event_id = "grouping".event_id)
3. 16.961 16.961 ↑ 93.0 2 1

Seq Scan on coupon c (cost=0.00..11,135.36 rows=186 width=91) (actual time=4.803..16.961 rows=2 loops=1)

  • Filter: (mapping_target = 1)
  • Rows Removed by Filter: 37231
4. 0.006 32.164 ↑ 100.0 2 1

Hash (cost=11,745.85..11,745.85 rows=200 width=24) (actual time=32.164..32.164 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
5. 0.001 32.158 ↑ 66.7 3 1

Subquery Scan on grouping (cost=11,741.85..11,745.85 rows=200 width=24) (actual time=32.156..32.158 rows=3 loops=1)

6. 6.074 32.157 ↑ 66.7 3 1

HashAggregate (cost=11,741.85..11,743.85 rows=200 width=40) (actual time=32.155..32.157 rows=3 loops=1)

  • Group Key: c1.event_id
7. 6.325 26.083 ↑ 1.0 27,398 1

Hash Left Join (cost=259.58..11,467.08 rows=27,477 width=28) (actual time=0.319..26.083 rows=27,398 loops=1)

  • Hash Cond: (c1.id = ce.coupon_id)
8. 19.444 19.444 ↑ 1.0 27,398 1

Seq Scan on coupon c1 (cost=0.00..11,135.36 rows=27,477 width=40) (actual time=0.002..19.444 rows=27,398 loops=1)

  • Filter: (type = 0)
  • Rows Removed by Filter: 9835
9. 0.029 0.314 ↓ 1.0 160 1

Hash (cost=257.59..257.59 rows=159 width=20) (actual time=0.314..0.314 rows=160 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
10. 0.285 0.285 ↓ 1.0 160 1

Seq Scan on coupon_ext ce (cost=0.00..257.59 rows=159 width=20) (actual time=0.004..0.285 rows=160 loops=1)

11. 0.033 0.066 ↑ 1.0 152 1

Hash (cost=3.52..3.52 rows=152 width=28) (actual time=0.066..0.066 rows=152 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
12. 0.033 0.033 ↑ 1.0 152 1

Seq Scan on coupon_event cet (cost=0.00..3.52 rows=152 width=28) (actual time=0.007..0.033 rows=152 loops=1)

Planning time : 0.404 ms
Execution time : 49.308 ms