explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nawT

Settings
# exclusive inclusive rows x rows loops node
1. 664.846 84,749.823 ↓ 3.0 3 1

Hash Right Join (cost=66,102.91..471,813.37 rows=1 width=388) (actual time=39,878.008..84,749.823 rows=3 loops=1)

  • Hash Cond: (c_1.idguid = c.idguid)
  • Functions: 262
  • Options: Inlining false, Optimization false, Expressions true, Deforming true
  • Timing: Generation 96.943 ms, Inlining 0.000 ms, Optimization 52.604 ms, Emission 738.457 ms, Total 888.005 ms
2. 1,133.120 80,652.236 ↓ 1.0 666,239 1

Append (cost=2.96..403,966.32 rows=665,557 width=212) (actual time=0.565..80,652.236 rows=666,239 loops=1)

3. 0.006 0.054 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.96..29.33 rows=1 width=212) (actual time=0.053..0.054 rows=0 loops=1)

4. 0.005 0.048 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.53..27.29 rows=1 width=220) (actual time=0.046..0.048 rows=0 loops=1)

5. 0.005 0.043 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.11..22.53 rows=1 width=216) (actual time=0.042..0.043 rows=0 loops=1)

6. 0.005 0.038 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.69..21.99 rows=1 width=184) (actual time=0.037..0.038 rows=0 loops=1)

7. 0.004 0.033 ↓ 0.0 0 1

Nested Loop (cost=1.27..21.02 rows=1 width=180) (actual time=0.032..0.033 rows=0 loops=1)

8. 0.005 0.029 ↓ 0.0 0 1

Nested Loop (cost=0.84..20.24 rows=1 width=164) (actual time=0.027..0.029 rows=0 loops=1)

9. 0.005 0.024 ↓ 0.0 0 1

Nested Loop (cost=0.42..19.70 rows=1 width=164) (actual time=0.023..0.024 rows=0 loops=1)

10. 0.019 0.019 ↓ 0.0 0 1

Seq Scan on contractcustomers co (cost=0.00..11.25 rows=1 width=172) (actual time=0.018..0.019 rows=0 loops=1)

  • Filter: (customerrolecid = 168001)
11. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customerships_customerid on customerships cs (cost=0.42..8.44 rows=1 width=24) (never executed)

  • Index Cond: ((customerid)::text = (co.customerkey)::text)
12. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customerrelations_customershipguid on customerrelations cr (cost=0.42..0.53 rows=1 width=32) (never executed)

  • Index Cond: (customershipguid = cs.idguid)
  • Filter: (typecid = 149001)
13. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "PK_customers" on customers c_1 (cost=0.42..0.78 rows=1 width=16) (never executed)

  • Index Cond: (idguid = cr.customerguid)
  • Heap Fetches: 0
14. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_customers" on customers c_2 (cost=0.42..0.97 rows=1 width=36) (never executed)

  • Index Cond: (idguid = cr.customerguid)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customerrelations_customerguid on customerrelations cr_1 (cost=0.42..0.53 rows=1 width=32) (never executed)

  • Index Cond: (customerguid = c_1.idguid)
  • Filter: (typecid = 149004)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_customers" on customers c_3 (cost=0.42..4.76 rows=1 width=36) (never executed)

  • Index Cond: (idguid = cr_1.customerguid)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_customerships" on customerships cs_1 (cost=0.42..2.04 rows=1 width=24) (never executed)

  • Index Cond: (idguid = cr_1.customershipguid)
18. 0.021 0.547 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.96..19.09 rows=1 width=212) (actual time=0.502..0.547 rows=1 loops=1)

19. 0.027 0.515 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.53..17.05 rows=1 width=220) (actual time=0.473..0.515 rows=1 loops=1)

20. 0.033 0.478 ↑ 1.0 1 1

Nested Loop Left Join (cost=2.11..12.29 rows=1 width=216) (actual time=0.440..0.478 rows=1 loops=1)

21. 0.023 0.400 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.69..11.75 rows=1 width=184) (actual time=0.367..0.400 rows=1 loops=1)

22. 0.027 0.343 ↑ 1.0 1 1

Nested Loop (cost=1.27..10.78 rows=1 width=180) (actual time=0.313..0.343 rows=1 loops=1)

23. 0.024 0.277 ↑ 1.0 1 1

Nested Loop (cost=0.84..10.00 rows=1 width=164) (actual time=0.252..0.277 rows=1 loops=1)

24. 0.033 0.204 ↑ 1.0 1 1

Nested Loop (cost=0.42..9.46 rows=1 width=164) (actual time=0.190..0.204 rows=1 loops=1)

25. 0.086 0.086 ↑ 1.0 1 1

Seq Scan on contractcustomers co_1 (cost=0.00..1.01 rows=1 width=172) (actual time=0.081..0.086 rows=1 loops=1)

  • Filter: (customerrolecid = 168001)
26. 0.085 0.085 ↑ 1.0 1 1

Index Scan using idx_customerships_customerid on customerships cs_2 (cost=0.42..8.44 rows=1 width=24) (actual time=0.081..0.085 rows=1 loops=1)

  • Index Cond: ((customerid)::text = (co_1.customerkey)::text)
27. 0.049 0.049 ↑ 1.0 1 1

Index Scan using idx_customerrelations_customershipguid on customerrelations cr_2 (cost=0.42..0.53 rows=1 width=32) (actual time=0.043..0.049 rows=1 loops=1)

  • Index Cond: (customershipguid = cs_2.idguid)
  • Filter: (typecid = 149001)
28. 0.039 0.039 ↑ 1.0 1 1

Index Only Scan using "PK_customers" on customers c_4 (cost=0.42..0.78 rows=1 width=16) (actual time=0.038..0.039 rows=1 loops=1)

  • Index Cond: (idguid = cr_2.customerguid)
  • Heap Fetches: 1
29. 0.034 0.034 ↑ 1.0 1 1

Index Scan using "PK_customers" on customers c_5 (cost=0.42..0.97 rows=1 width=36) (actual time=0.033..0.034 rows=1 loops=1)

  • Index Cond: (idguid = cr_2.customerguid)
30. 0.045 0.045 ↓ 0.0 0 1

Index Scan using idx_customerrelations_customerguid on customerrelations cr_3 (cost=0.42..0.53 rows=1 width=32) (actual time=0.043..0.045 rows=0 loops=1)

  • Index Cond: (customerguid = c_4.idguid)
  • Filter: (typecid = 149004)
  • Rows Removed by Filter: 1
31. 0.010 0.010 ↓ 0.0 0 1

Index Scan using "PK_customers" on customers c_6 (cost=0.42..4.76 rows=1 width=36) (actual time=0.009..0.010 rows=0 loops=1)

  • Index Cond: (idguid = cr_3.customerguid)
32. 0.011 0.011 ↓ 0.0 0 1

Index Scan using "PK_customerships" on customerships cs_3 (cost=0.42..2.04 rows=1 width=24) (actual time=0.009..0.011 rows=0 loops=1)

  • Index Cond: (idguid = cr_3.customershipguid)
33. 0.004 0.044 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.96..29.33 rows=1 width=212) (actual time=0.042..0.044 rows=0 loops=1)

34. 0.005 0.040 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.53..27.29 rows=1 width=220) (actual time=0.038..0.040 rows=0 loops=1)

35. 0.004 0.035 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.11..22.53 rows=1 width=216) (actual time=0.033..0.035 rows=0 loops=1)

36. 0.005 0.031 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.69..21.99 rows=1 width=184) (actual time=0.029..0.031 rows=0 loops=1)

37. 0.004 0.026 ↓ 0.0 0 1

Nested Loop (cost=1.27..21.02 rows=1 width=180) (actual time=0.024..0.026 rows=0 loops=1)

38. 0.005 0.022 ↓ 0.0 0 1

Nested Loop (cost=0.84..20.24 rows=1 width=164) (actual time=0.020..0.022 rows=0 loops=1)

39. 0.005 0.017 ↓ 0.0 0 1

Nested Loop (cost=0.42..19.70 rows=1 width=164) (actual time=0.015..0.017 rows=0 loops=1)

40. 0.012 0.012 ↓ 0.0 0 1

Seq Scan on contractcustomers co_2 (cost=0.00..11.25 rows=1 width=172) (actual time=0.010..0.012 rows=0 loops=1)

  • Filter: (customerrolecid = 168001)
41. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customerships_customerid on customerships cs_4 (cost=0.42..8.44 rows=1 width=24) (never executed)

  • Index Cond: ((customerid)::text = (co_2.customerkey)::text)
42. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customerrelations_customershipguid on customerrelations cr_4 (cost=0.42..0.53 rows=1 width=32) (never executed)

  • Index Cond: (customershipguid = cs_4.idguid)
  • Filter: (typecid = 149001)
43. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "PK_customers" on customers c_7 (cost=0.42..0.78 rows=1 width=16) (never executed)

  • Index Cond: (idguid = cr_4.customerguid)
  • Heap Fetches: 0
44. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_customers" on customers c_8 (cost=0.42..0.97 rows=1 width=36) (never executed)

  • Index Cond: (idguid = cr_4.customerguid)
45. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customerrelations_customerguid on customerrelations cr_5 (cost=0.42..0.53 rows=1 width=32) (never executed)

  • Index Cond: (customerguid = c_7.idguid)
  • Filter: (typecid = 149004)
46. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_customers" on customers c_9 (cost=0.42..4.76 rows=1 width=36) (never executed)

  • Index Cond: (idguid = cr_5.customerguid)
47. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_customerships" on customerships cs_5 (cost=0.42..2.04 rows=1 width=24) (never executed)

  • Index Cond: (idguid = cr_5.customershipguid)
48. 0.005 0.042 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.96..29.33 rows=1 width=212) (actual time=0.040..0.042 rows=0 loops=1)

49. 0.004 0.037 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.53..27.29 rows=1 width=220) (actual time=0.035..0.037 rows=0 loops=1)

50. 0.005 0.033 ↓ 0.0 0 1

Nested Loop Left Join (cost=2.11..22.53 rows=1 width=216) (actual time=0.031..0.033 rows=0 loops=1)

51. 0.005 0.028 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.69..21.99 rows=1 width=184) (actual time=0.026..0.028 rows=0 loops=1)

52. 0.005 0.023 ↓ 0.0 0 1

Nested Loop (cost=1.27..21.02 rows=1 width=180) (actual time=0.021..0.023 rows=0 loops=1)

53. 0.005 0.018 ↓ 0.0 0 1

Nested Loop (cost=0.84..20.24 rows=1 width=164) (actual time=0.017..0.018 rows=0 loops=1)

54. 0.004 0.013 ↓ 0.0 0 1

Nested Loop (cost=0.42..19.70 rows=1 width=164) (actual time=0.012..0.013 rows=0 loops=1)

55. 0.009 0.009 ↓ 0.0 0 1

Seq Scan on contractcustomers co_3 (cost=0.00..11.25 rows=1 width=172) (actual time=0.007..0.009 rows=0 loops=1)

  • Filter: (customerrolecid = 168001)
56. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customerships_customerid on customerships cs_6 (cost=0.42..8.44 rows=1 width=24) (never executed)

  • Index Cond: ((customerid)::text = (co_3.customerkey)::text)
57. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customerrelations_customershipguid on customerrelations cr_6 (cost=0.42..0.53 rows=1 width=32) (never executed)

  • Index Cond: (customershipguid = cs_6.idguid)
  • Filter: (typecid = 149001)
58. 0.000 0.000 ↓ 0.0 0

Index Only Scan using "PK_customers" on customers c_10 (cost=0.42..0.78 rows=1 width=16) (never executed)

  • Index Cond: (idguid = cr_6.customerguid)
  • Heap Fetches: 0
59. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_customers" on customers c_11 (cost=0.42..0.97 rows=1 width=36) (never executed)

  • Index Cond: (idguid = cr_6.customerguid)
60. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_customerrelations_customerguid on customerrelations cr_7 (cost=0.42..0.53 rows=1 width=32) (never executed)

  • Index Cond: (customerguid = c_10.idguid)
  • Filter: (typecid = 149004)
61. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_customers" on customers c_12 (cost=0.42..4.76 rows=1 width=36) (never executed)

  • Index Cond: (idguid = cr_7.customerguid)
62. 0.000 0.000 ↓ 0.0 0

Index Scan using "PK_customerships" on customerships cs_7 (cost=0.42..2.04 rows=1 width=24) (never executed)

  • Index Cond: (idguid = cr_7.customershipguid)
63. 1,491.257 79,518.429 ↓ 1.0 666,238 1

Hash Left Join (cost=314,513.35..393,875.88 rows=665,553 width=212) (actual time=36,444.288..79,518.429 rows=666,238 loops=1)

  • Hash Cond: (c_13.idguid = cr_9.customerguid)
64. 11,308.582 75,344.402 ↓ 1.0 666,075 1

Hash Join (cost=226,930.65..303,520.35 rows=665,553 width=184) (actual time=33,761.294..75,344.402 rows=666,075 loops=1)

  • Hash Cond: ((co_4.customerkey)::text = (cs_8.customerid)::text)
65. 30,278.173 30,278.173 ↓ 1.0 667,161 1

Seq Scan on contractcustomers co_4 (cost=0.00..34,533.89 rows=665,940 width=148) (actual time=0.040..30,278.173 rows=667,161 loops=1)

  • Filter: (customerrolecid = 168001)
  • Rows Removed by Filter: 21790
66. 1,269.441 33,757.647 ↑ 1.0 487,611 1

Hash (cost=216,547.28..216,547.28 rows=487,710 width=44) (actual time=33,757.645..33,757.647 rows=487,611 loops=1)

  • Buckets: 262144 Batches: 4 Memory Usage: 11154kB
67. 1,245.672 32,488.206 ↑ 1.0 487,611 1

Hash Left Join (cost=168,647.11..216,547.28 rows=487,710 width=44) (actual time=26,108.901..32,488.206 rows=487,611 loops=1)

  • Hash Cond: (cr_8.customerguid = c_14.idguid)
68. 2,115.435 24,134.063 ↑ 1.0 487,611 1

Hash Join (cost=93,529.82..128,572.74 rows=487,710 width=40) (actual time=18,999.050..24,134.063 rows=487,611 loops=1)

  • Hash Cond: (cr_8.customerguid = c_13.idguid)
69. 1,814.655 9,828.100 ↑ 1.0 487,611 1

Hash Join (cost=19,895.53..45,470.20 rows=487,710 width=24) (actual time=6,770.296..9,828.100 rows=487,611 loops=1)

  • Hash Cond: (cr_8.customershipguid = cs_8.idguid)
70. 1,249.680 1,249.680 ↑ 1.0 487,611 1

Seq Scan on customerrelations cr_8 (cost=0.00..14,768.42 rows=487,710 width=32) (actual time=0.043..1,249.680 rows=487,611 loops=1)

  • Filter: (typecid = 149001)
  • Rows Removed by Filter: 23383
71. 960.267 6,763.765 ↑ 1.0 487,668 1

Hash (cost=10,941.68..10,941.68 rows=487,668 width=24) (actual time=6,763.763..6,763.765 rows=487,668 loops=1)

  • Buckets: 524288 Batches: 2 Memory Usage: 17446kB
72. 5,803.498 5,803.498 ↑ 1.0 487,668 1

Seq Scan on customerships cs_8 (cost=0.00..10,941.68 rows=487,668 width=24) (actual time=24.174..5,803.498 rows=487,668 loops=1)

73. 4,201.633 12,190.528 ↑ 1.0 505,595 1

Hash (cost=64,834.35..64,834.35 rows=506,235 width=16) (actual time=12,190.527..12,190.528 rows=505,595 loops=1)

  • Buckets: 524288 Batches: 2 Memory Usage: 15972kB
74. 7,988.895 7,988.895 ↑ 1.0 505,595 1

Seq Scan on customers c_13 (cost=0.00..64,834.35 rows=506,235 width=16) (actual time=4.681..7,988.895 rows=505,595 loops=1)

75. 4,089.620 7,108.471 ↑ 1.0 505,595 1

Hash (cost=64,834.35..64,834.35 rows=506,235 width=36) (actual time=7,108.469..7,108.471 rows=505,595 loops=1)

  • Buckets: 262144 Batches: 2 Memory Usage: 18956kB
76. 3,018.851 3,018.851 ↑ 1.0 505,595 1

Seq Scan on customers c_14 (cost=0.00..64,834.35 rows=506,235 width=36) (actual time=2.414..3,018.851 rows=505,595 loops=1)

77. 34.618 2,682.770 ↓ 1.0 21,188 1

Hash (cost=87,319.32..87,319.32 rows=21,070 width=44) (actual time=2,682.768..2,682.770 rows=21,188 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1824kB
78. 515.125 2,648.152 ↓ 1.0 21,188 1

Hash Right Join (cost=20,375.89..87,319.32 rows=21,070 width=44) (actual time=953.164..2,648.152 rows=21,188 loops=1)

  • Hash Cond: (c_15.idguid = cr_9.customerguid)
79. 1,186.843 1,186.843 ↑ 1.0 505,595 1

Seq Scan on customers c_15 (cost=0.00..64,834.35 rows=506,235 width=36) (actual time=2.469..1,186.843 rows=505,595 loops=1)

80. 25.525 946.184 ↓ 1.0 21,188 1

Hash (cost=20,112.51..20,112.51 rows=21,070 width=24) (actual time=946.183..946.184 rows=21,188 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1415kB
81. 436.132 920.659 ↓ 1.0 21,188 1

Hash Right Join (cost=7,131.38..20,112.51 rows=21,070 width=24) (actual time=57.859..920.659 rows=21,188 loops=1)

  • Hash Cond: (cs_9.idguid = cr_9.customershipguid)
82. 427.054 427.054 ↑ 1.0 487,668 1

Seq Scan on customerships cs_9 (cost=0.00..10,941.68 rows=487,668 width=24) (actual time=0.122..427.054 rows=487,668 loops=1)

83. 22.470 57.473 ↓ 1.0 21,188 1

Hash (cost=6,868.00..6,868.00 rows=21,070 width=32) (actual time=57.471..57.473 rows=21,188 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1581kB
84. 35.003 35.003 ↓ 1.0 21,188 1

Index Scan using idx_customerrelations_typecid on customerrelations cr_9 (cost=0.42..6,868.00 rows=21,070 width=32) (actual time=0.102..35.003 rows=21,188 loops=1)

  • Index Cond: (typecid = 149004)
85. 0.042 3,432.741 ↑ 1.0 1 1

Hash (cost=66,099.94..66,099.94 rows=1 width=176) (actual time=3,432.739..3,432.741 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
86. 3,432.699 3,432.699 ↑ 1.0 1 1

Seq Scan on customers c (cost=0.00..66,099.94 rows=1 width=176) (actual time=3,148.960..3,432.699 rows=1 loops=1)

  • Filter: ((identifier)::text = '140362-464D'::text)
  • Rows Removed by Filter: 505594
Planning time : 37.647 ms
Execution time : 84,850.697 ms