explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sgfL : modify_partial on mapping_target & type

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 99.641 ↓ 1.3 4 1

Merge Join (cost=14,171.87..14,172.12 rows=3 width=110) (actual time=99.623..99.641 rows=4 loops=1)

  • Merge Cond: (c.event_id = cett.id)
2. 0.009 99.603 ↓ 1.3 4 1

Merge Left Join (cost=14,170.81..14,171.01 rows=3 width=95) (actual time=99.589..99.603 rows=4 loops=1)

  • Merge Cond: (c.event_id = c1.event_id)
3. 0.007 0.019 ↓ 1.3 4 1

Sort (cost=12.20..12.21 rows=3 width=87) (actual time=0.018..0.019 rows=4 loops=1)

  • Sort Key: c.event_id
  • Sort Method: quicksort Memory: 25kB
4. 0.012 0.012 ↓ 1.3 4 1

Index Scan using coupon_mapping_primary_index on coupon c (cost=0.13..12.18 rows=3 width=87) (actual time=0.007..0.012 rows=4 loops=1)

5. 0.006 99.575 ↓ 1.2 5 1

Materialize (cost=14,158.62..14,158.77 rows=4 width=24) (actual time=99.566..99.575 rows=5 loops=1)

6. 0.011 99.569 ↓ 1.2 5 1

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

  • Group Key: c1.event_id
7. 0.000 99.558 ↓ 1.4 11 1

Sort (cost=14,158.62..14,158.64 rows=8 width=24) (actual time=99.557..99.558 rows=11 loops=1)

  • Sort Key: c1.event_id
  • Sort Method: quicksort Memory: 25kB
8. 12.574 101.012 ↓ 1.4 11 1

Gather (cost=14,157.66..14,158.50 rows=8 width=24) (actual time=96.555..101.012 rows=11 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
9. 11.661 88.438 ↑ 1.0 4 3 / 3

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

  • Group Key: c1.event_id
10. 17.386 76.777 ↑ 1.3 27,299 3 / 3

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

  • Hash Cond: (c1.id = ce.coupon_id)
11. 19.646 19.646 ↑ 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.004..19.646 rows=27,299 loops=3)

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

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

  • Buckets: 65536 Batches: 1 Memory Usage: 3288kB
13. 14.101 14.101 ↑ 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..14.101 rows=54,659 loops=3)

14. 0.016 0.026 ↓ 1.3 4 1

Sort (cost=1.05..1.06 rows=3 width=29) (actual time=0.026..0.026 rows=4 loops=1)

  • Sort Key: cett.id
  • Sort Method: quicksort Memory: 25kB
15. 0.010 0.010 ↓ 1.3 4 1

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

Planning time : 0.496 ms
Execution time : 101.495 ms