explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kMce

Settings
# exclusive inclusive rows x rows loops node
1. 147,583.547 205,065.225 ↓ 0.0 0 1

Insert on fact_deal_line (cost=22,663.92..358,334.60 rows=7,487,387 width=234) (actual time=205,065.225..205,065.225 rows=0 loops=1)

2. 56,344.784 57,481.678 ↓ 2.0 14,738,864 1

Hash Left Join (cost=22,663.92..358,334.60 rows=7,487,387 width=234) (actual time=472.304..57,481.678 rows=14,738,864 loops=1)

  • Hash Cond: (lh.broadcast_quarter = (dd.broadcast_quarter_display)::bpchar)
3. 131.800 1,127.764 ↓ 1.9 160,935 1

Hash Left Join (cost=21,369.81..29,215.28 rows=82,677 width=183) (actual time=462.979..1,127.764 rows=160,935 loops=1)

  • Hash Cond: ((lh.network_cd)::text = (dn.network_cd)::text)
4. 151.937 995.847 ↓ 1.9 160,935 1

Hash Left Join (cost=21,357.23..28,065.89 rows=82,677 width=183) (actual time=462.850..995.847 rows=160,935 loops=1)

  • Hash Cond: ((lh.deal_cd)::text = (dp.deal_cd)::text)
5. 353.160 832.964 ↓ 1.9 160,935 1

Hash Right Join (cost=20,260.47..25,832.32 rows=82,677 width=187) (actual time=451.751..832.964 rows=160,935 loops=1)

  • Hash Cond: ((cl.deal_cd)::text = (lh.deal_cd)::text)
6. 28.356 28.356 ↓ 4.6 68,742 1

Seq Scan on temp_change_log_entries cl (cost=0.00..1,035.45 rows=15,045 width=222) (actual time=0.031..28.356 rows=68,742 loops=1)

7. 89.348 451.448 ↓ 2.0 160,935 1

Hash (cost=17,152.32..17,152.32 rows=82,012 width=183) (actual time=451.448..451.448 rows=160,935 loops=1)

  • Buckets: 32768 (originally 32768) Batches: 16 (originally 8) Memory Usage: 4095kB
8. 103.116 362.100 ↓ 2.0 160,935 1

Hash Right Join (cost=14,455.96..17,152.32 rows=82,012 width=183) (actual time=257.602..362.100 rows=160,935 loops=1)

  • Hash Cond: (((dlc.deal_cd)::text = (lh.deal_cd)::text) AND ((dlc.network_cd)::text = (lh.network_cd)::text) AND ((dlc.broadcast_quarter)::bpchar = lh.broadcast_quarter))
9. 1.652 1.652 ↓ 4.0 7,184 1

Seq Scan on deal_line_comment dlc (cost=0.00..274.99 rows=1,799 width=342) (actual time=0.018..1.652 rows=7,184 loops=1)

10. 98.223 257.332 ↓ 2.0 160,935 1

Hash (cost=11,017.75..11,017.75 rows=82,012 width=175) (actual time=257.332..257.332 rows=160,935 loops=1)

  • Buckets: 32768 Batches: 8 Memory Usage: 3969kB
11. 72.321 159.109 ↓ 2.0 160,935 1

Hash Join (cost=6,958.13..11,017.75 rows=82,012 width=175) (actual time=75.977..159.109 rows=160,935 loops=1)

  • Hash Cond: ((lhd.deal_cd)::text = (lh.deal_cd)::text)
12. 11.281 11.281 ↓ 2.4 18,489 1

Seq Scan on lighthouse_deals lhd (cost=0.00..583.05 rows=7,605 width=354) (actual time=0.037..11.281 rows=18,489 loops=1)

13. 42.919 75.507 ↑ 1.0 160,939 1

Hash (cost=3,688.39..3,688.39 rows=160,939 width=39) (actual time=75.507..75.507 rows=160,939 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 3189kB
14. 32.588 32.588 ↑ 1.0 160,939 1

Seq Scan on deal_network_quarter lh (cost=0.00..3,688.39 rows=160,939 width=39) (actual time=0.124..32.588 rows=160,939 loops=1)

15. 3.601 10.946 ↑ 1.0 18,490 1

Hash (cost=865.64..865.64 rows=18,490 width=20) (actual time=10.946..10.946 rows=18,490 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1133kB
16. 4.079 7.345 ↑ 1.0 18,490 1

Hash Left Join (cost=290.17..865.64 rows=18,490 width=20) (actual time=2.097..7.345 rows=18,490 loops=1)

  • Hash Cond: (dp.planner_user_id = du.user_id)
17. 1.343 1.343 ↑ 1.0 18,490 1

Seq Scan on deal_properties dp (cost=0.00..526.90 rows=18,490 width=20) (actual time=0.128..1.343 rows=18,490 loops=1)

18. 0.956 1.923 ↓ 1.0 6,764 1

Hash (cost=205.63..205.63 rows=6,763 width=8) (actual time=1.922..1.923 rows=6,764 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 329kB
19. 0.967 0.967 ↓ 1.0 6,764 1

Seq Scan on dim_user du (cost=0.00..205.63 rows=6,763 width=8) (actual time=0.005..0.967 rows=6,764 loops=1)

20. 0.065 0.117 ↑ 1.0 337 1

Hash (cost=8.37..8.37 rows=337 width=14) (actual time=0.117..0.117 rows=337 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 24kB
21. 0.052 0.052 ↑ 1.0 337 1

Seq Scan on dim_network dn (cost=0.00..8.37 rows=337 width=14) (actual time=0.006..0.052 rows=337 loops=1)

22. 3.473 9.130 ↑ 1.0 21,916 1

Hash (cost=1,020.16..1,020.16 rows=21,916 width=15) (actual time=9.130..9.130 rows=21,916 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1262kB
23. 5.657 5.657 ↑ 1.0 21,916 1

Seq Scan on dim_dates dd (cost=0.00..1,020.16 rows=21,916 width=15) (actual time=0.120..5.657 rows=21,916 loops=1)

Planning time : 5.689 ms
Execution time : 205,069.403 ms