explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rnhI : modify_partial on mapping_target & type

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 90.954 ↓ 1.3 4 1

Merge Join (cost=14,000.90..14,001.15 rows=3 width=100) (actual time=90.940..90.954 rows=4 loops=1)

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

Merge Left Join (cost=13,999.85..14,000.04 rows=3 width=87) (actual time=90.906..90.915 rows=4 loops=1)

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

Sort (cost=12.20..12.21 rows=3 width=79) (actual time=0.015..0.016 rows=4 loops=1)

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

Index Scan using coupon_mapping_primary_index on coupon c (cost=0.13..12.18 rows=3 width=79) (actual time=0.005..0.009 rows=4 loops=1)

5. 0.003 90.890 ↑ 1.0 4 1

Materialize (cost=13,987.65..13,987.80 rows=4 width=24) (actual time=90.886..90.890 rows=4 loops=1)

6. 0.006 90.887 ↑ 1.0 4 1

Finalize GroupAggregate (cost=13,987.65..13,987.75 rows=4 width=40) (actual time=90.884..90.887 rows=4 loops=1)

  • Group Key: c1.event_id
7. 0.000 90.881 ↓ 1.1 9 1

Sort (cost=13,987.65..13,987.67 rows=8 width=24) (actual time=90.880..90.881 rows=9 loops=1)

  • Sort Key: c1.event_id
  • Sort Method: quicksort Memory: 25kB
8. 13.232 91.570 ↓ 1.1 9 1

Gather (cost=13,986.69..13,987.53 rows=8 width=24) (actual time=90.860..91.570 rows=9 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
9. 6.948 78.338 ↑ 1.3 3 3 / 3

Partial HashAggregate (cost=12,986.69..12,986.73 rows=4 width=24) (actual time=78.337..78.338 rows=3 loops=3)

  • Group Key: c1.event_id
10. 8.460 71.390 ↑ 1.1 18,167 3 / 3

Hash Left Join (cost=1,583.36..12,784.26 rows=20,243 width=28) (actual time=38.176..71.390 rows=18,167 loops=3)

  • Hash Cond: (c1.id = ce.coupon_id)
11. 25.019 25.019 ↑ 1.1 18,167 3 / 3

Parallel Seq Scan on coupon c1 (cost=0.00..11,147.76 rows=20,243 width=40) (actual time=0.004..25.019 rows=18,167 loops=3)

  • Filter: ((event_id IS NOT NULL) AND (type = 0))
  • Rows Removed by Filter: 12410
12. 20.482 37.911 ↑ 1.0 54,659 3 / 3

Hash (cost=898.16..898.16 rows=54,816 width=20) (actual time=37.911..37.911 rows=54,659 loops=3)

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

Seq Scan on coupon_ext ce (cost=0.00..898.16 rows=54,816 width=20) (actual time=0.014..17.429 rows=54,659 loops=3)

14. 0.017 0.025 ↓ 1.3 4 1

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

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

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

Planning time : 0.494 ms
Execution time : 92.067 ms