explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dk1R

Settings
# exclusive inclusive rows x rows loops node
1. 373.990 59,192.413 ↓ 2.0 2 1

Limit (cost=277,898.76..367,824.63 rows=1 width=327) (actual time=55,619.770..59,192.413 rows=2 loops=1)

  • Functions: 73
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 44.196 ms, Inlining 0.000 ms, Optimization 18.346 ms, Emission 295.779 ms, Total 358.320 ms
2. 848.230 58,818.423 ↓ 2.0 2 1

Hash Join (cost=277,898.76..367,824.63 rows=1 width=327) (actual time=55,245.787..58,818.423 rows=2 loops=1)

  • Hash Cond: (cr.customerguid = c.idguid)
3. 1,845.581 57,970.041 ↑ 1.0 666,238 1

Hash Left Join (cost=277,890.30..366,066.43 rows=666,564 width=152) (actual time=17,754.081..57,970.041 rows=666,238 loops=1)

  • Hash Cond: (c_1.idguid = cr_1.customerguid)
4. 13,607.576 52,040.095 ↑ 1.0 666,075 1

Hash Join (cost=189,967.04..275,358.13 rows=666,564 width=126) (actual time=13,669.482..52,040.095 rows=666,075 loops=1)

  • Hash Cond: ((co.customerkey)::text = (cs.customerid)::text)
5. 24,765.893 24,765.893 ↑ 1.0 667,161 1

Seq Scan on contractcustomers co (cost=0.00..54,044.32 rows=667,235 width=76) (actual time=0.050..24,765.893 rows=667,161 loops=1)

  • Filter: (customerrolecid = 168,001)
  • Rows Removed by Filter: 21,790
6. 926.005 13,666.626 ↓ 1.0 487,611 1

Hash (cost=178,636.86..178,636.86 rows=487,454 width=58) (actual time=13,666.626..13,666.626 rows=487,611 loops=1)

  • Buckets: 262,144 Batches: 4 Memory Usage: 12,811kB
7. 1,834.231 12,740.621 ↓ 1.0 487,611 1

Hash Left Join (cost=130,754.70..178,636.86 rows=487,454 width=58) (actual time=6,261.084..12,740.621 rows=487,611 loops=1)

  • Hash Cond: (cr.customerguid = c_2.idguid)
8. 1,876.693 7,072.049 ↓ 1.0 487,611 1

Hash Join (cost=55,656.82..90,691.40 rows=487,454 width=40) (actual time=2,424.122..7,072.049 rows=487,611 loops=1)

  • Hash Cond: (cr.customerguid = c_1.idguid)
9. 1,854.852 3,869.879 ↓ 1.0 487,611 1

Hash Join (cost=19,895.53..45,467.53 rows=487,454 width=24) (actual time=1,095.769..3,869.879 rows=487,611 loops=1)

  • Hash Cond: (cr.customershipguid = cs.idguid)
10. 924.120 924.120 ↓ 1.0 487,611 1

Seq Scan on customerrelations cr (cost=0.00..14,768.42 rows=487,454 width=32) (actual time=0.033..924.120 rows=487,611 loops=1)

  • Filter: (typecid = 149,001)
  • Rows Removed by Filter: 23,383
11. 573.133 1,090.907 ↑ 1.0 487,668 1

Hash (cost=10,941.68..10,941.68 rows=487,668 width=24) (actual time=1,090.906..1,090.907 rows=487,668 loops=1)

  • Buckets: 524,288 Batches: 2 Memory Usage: 17,446kB
12. 517.774 517.774 ↑ 1.0 487,668 1

Seq Scan on customerships cs (cost=0.00..10,941.68 rows=487,668 width=24) (actual time=0.053..517.774 rows=487,668 loops=1)

13. 692.585 1,325.477 ↑ 1.0 505,595 1

Hash (cost=26,972.35..26,972.35 rows=505,595 width=16) (actual time=1,325.476..1,325.477 rows=505,595 loops=1)

  • Buckets: 524,288 Batches: 2 Memory Usage: 15,972kB
14. 632.892 632.892 ↑ 1.0 505,595 1

Index Only Scan using "PK_customers" on customers c_1 (cost=0.42..26,972.35 rows=505,595 width=16) (actual time=0.032..632.892 rows=505,595 loops=1)

  • Heap Fetches: 0
15. 1,168.756 3,834.341 ↑ 1.0 505,595 1

Hash (cost=64,827.95..64,827.95 rows=505,595 width=34) (actual time=3,834.340..3,834.341 rows=505,595 loops=1)

  • Buckets: 262,144 Batches: 2 Memory Usage: 18,448kB
16. 2,665.585 2,665.585 ↑ 1.0 505,595 1

Seq Scan on customers c_2 (cost=0.00..64,827.95 rows=505,595 width=34) (actual time=0.060..2,665.585 rows=505,595 loops=1)

17. 50.402 4,084.365 ↑ 1.0 21,188 1

Hash (cost=87,652.65..87,652.65 rows=21,649 width=42) (actual time=4,084.364..4,084.365 rows=21,188 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,783kB
18. 748.177 4,033.963 ↑ 1.0 21,188 1

Hash Right Join (cost=20,712.23..87,652.65 rows=21,649 width=42) (actual time=1,567.069..4,033.963 rows=21,188 loops=1)

  • Hash Cond: (c_3.idguid = cr_1.customerguid)
19. 1,718.965 1,718.965 ↑ 1.0 505,595 1

Seq Scan on customers c_3 (cost=0.00..64,827.95 rows=505,595 width=34) (actual time=0.061..1,718.965 rows=505,595 loops=1)

20. 44.694 1,566.821 ↑ 1.0 21,188 1

Hash (cost=20,441.62..20,441.62 rows=21,649 width=24) (actual time=1,566.820..1,566.821 rows=21,188 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,415kB
21. 724.879 1,522.127 ↑ 1.0 21,188 1

Hash Right Join (cost=7,454.70..20,441.62 rows=21,649 width=24) (actual time=82.308..1,522.127 rows=21,188 loops=1)

  • Hash Cond: (cs_1.idguid = cr_1.customershipguid)
22. 715.264 715.264 ↑ 1.0 487,668 1

Seq Scan on customerships cs_1 (cost=0.00..10,941.68 rows=487,668 width=24) (actual time=0.046..715.264 rows=487,668 loops=1)

23. 31.284 81.984 ↑ 1.0 21,188 1

Hash (cost=7,184.08..7,184.08 rows=21,649 width=32) (actual time=81.983..81.984 rows=21,188 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,581kB
24. 50.700 50.700 ↑ 1.0 21,188 1

Index Scan using idx_customerrelations_typecid on customerrelations cr_1 (cost=0.42..7,184.08 rows=21,649 width=32) (actual time=0.059..50.700 rows=21,188 loops=1)

  • Index Cond: (typecid = 149,004)
25. 0.022 0.152 ↑ 1.0 1 1

Hash (cost=8.44..8.44 rows=1 width=191) (actual time=0.151..0.152 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
26. 0.130 0.130 ↑ 1.0 1 1

Index Scan using idx_customers_identifier on customers c (cost=0.42..8.44 rows=1 width=191) (actual time=0.124..0.130 rows=1 loops=1)

  • Index Cond: ((identifier)::text = '6214717-1'::text)
Execution time : 59,242.702 ms