explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Hm2o : modify

Settings
# exclusive inclusive rows x rows loops node
1. 0.019 126.719 ↓ 1.3 4 1

Hash Join (cost=14,159.87..25,976.63 rows=3 width=110) (actual time=98.465..126.719 rows=4 loops=1)

  • Hash Cond: (c.event_id = cett.id)
2. 0.013 126.689 ↓ 1.3 4 1

Hash Left Join (cost=14,158.81..25,975.46 rows=3 width=95) (actual time=98.444..126.689 rows=4 loops=1)

  • Hash Cond: (c.event_id = "grouping".event_id)
3. 28.246 28.246 ↓ 1.3 4 1

Seq Scan on coupon c (cost=0.00..11,816.62 rows=3 width=87) (actual time=0.007..28.246 rows=4 loops=1)

  • Filter: (mapping_target = 0)
  • Rows Removed by Filter: 91726
4. 0.007 98.430 ↑ 1.0 4 1

Hash (cost=14,158.76..14,158.76 rows=4 width=24) (actual time=98.430..98.430 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
5. 0.002 98.423 ↓ 1.2 5 1

Subquery Scan on grouping (cost=14,158.62..14,158.76 rows=4 width=24) (actual time=98.419..98.423 rows=5 loops=1)

6. 0.007 98.421 ↓ 1.2 5 1

Finalize GroupAggregate (cost=14,158.62..14,158.72 rows=4 width=40) (actual time=98.418..98.421 rows=5 loops=1)

  • Group Key: c1.event_id
7. 0.000 98.414 ↓ 1.5 12 1

Sort (cost=14,158.62..14,158.64 rows=8 width=24) (actual time=98.413..98.414 rows=12 loops=1)

  • Sort Key: c1.event_id
  • Sort Method: quicksort Memory: 25kB
8. 11.090 98.458 ↓ 1.5 12 1

Gather (cost=14,157.66..14,158.50 rows=8 width=24) (actual time=97.979..98.458 rows=12 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
9. 10.645 87.368 ↑ 1.0 4 3 / 3

Partial HashAggregate (cost=13,157.66..13,157.70 rows=4 width=24) (actual time=87.367..87.368 rows=4 loops=3)

  • Group Key: c1.event_id
10. 12.100 76.723 ↑ 1.3 27,299 3 / 3

Hash Left Join (cost=1,578.83..12,816.22 rows=34,144 width=28) (actual time=37.598..76.723 rows=27,299 loops=3)

  • Hash Cond: (c1.id = ce.coupon_id)
11. 27.283 27.283 ↑ 1.3 27,299 3 / 3

Parallel Seq Scan on coupon c1 (cost=0.00..11,147.76 rows=34,144 width=40) (actual time=0.003..27.283 rows=27,299 loops=3)

  • Filter: (type = 0)
  • Rows Removed by Filter: 3278
12. 20.270 37.340 ↑ 1.0 54,659 3 / 3

Hash (cost=895.59..895.59 rows=54,659 width=20) (actual time=37.340..37.340 rows=54,659 loops=3)

  • Buckets: 65536 Batches: 1 Memory Usage: 3288kB
13. 17.070 17.070 ↑ 1.0 54,659 3 / 3

Seq Scan on coupon_ext ce (cost=0.00..895.59 rows=54,659 width=20) (actual time=0.013..17.070 rows=54,659 loops=3)

14. 0.005 0.011 ↓ 1.3 4 1

Hash (cost=1.03..1.03 rows=3 width=29) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.006 0.006 ↓ 1.3 4 1

Seq Scan on coupon_event cett (cost=0.00..1.03 rows=3 width=29) (actual time=0.004..0.006 rows=4 loops=1)

Planning time : 0.457 ms
Execution time : 127.232 ms