explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rj8D

Settings
# exclusive inclusive rows x rows loops node
1. 14.023 294.737 ↓ 10.7 6,231 1

HashAggregate (cost=2,197.43..2,203.24 rows=581 width=532) (actual time=288.403..294.737 rows=6,231 loops=1)

  • Group Key: "entitiesNotDefault".entity_id, "entitiesNotDefault".entity_unit_id, "entitiesNotDefault".dimension_id, "entitiesNotDefault".variable_id, "entitiesNotDefault".user_id
2.          

CTE entitiesNotDefault

3. 0.006 0.055 ↓ 0.0 0 1

Sort (cost=96.76..96.77 rows=2 width=53) (actual time=0.054..0.055 rows=0 loops=1)

  • Sort Key: variables.id
  • Sort Method: quicksort Memory: 25kB
4. 0.002 0.049 ↓ 0.0 0 1

Nested Loop (cost=91.74..96.75 rows=2 width=53) (actual time=0.048..0.049 rows=0 loops=1)

5. 0.002 0.047 ↓ 0.0 0 1

Nested Loop Left Join (cost=91.61..96.28 rows=3 width=53) (actual time=0.046..0.047 rows=0 loops=1)

6. 0.002 0.045 ↓ 0.0 0 1

Merge Join (cost=91.48..94.93 rows=3 width=24) (actual time=0.044..0.045 rows=0 loops=1)

  • Merge Cond: (evdr.user_group_id = ugg.id)
7. 0.001 0.043 ↓ 0.0 0 1

Nested Loop Left Join (cost=90.01..100.16 rows=3 width=28) (actual time=0.043..0.043 rows=0 loops=1)

  • Join Filter: (luug.user_group_id = ug.id)
8. 0.002 0.042 ↓ 0.0 0 1

Nested Loop (cost=90.01..98.21 rows=1 width=28) (actual time=0.041..0.042 rows=0 loops=1)

9. 0.002 0.040 ↓ 0.0 0 1

Nested Loop (cost=89.73..97.83 rows=1 width=24) (actual time=0.039..0.040 rows=0 loops=1)

10. 0.002 0.038 ↓ 0.0 0 1

Merge Left Join (cost=89.45..89.53 rows=1 width=20) (actual time=0.038..0.038 rows=0 loops=1)

  • Merge Cond: (evdr.user_group_id = ug.id)
11. 0.011 0.036 ↓ 0.0 0 1

Sort (cost=87.95..87.96 rows=1 width=16) (actual time=0.036..0.036 rows=0 loops=1)

  • Sort Key: evdr.user_group_id
  • Sort Method: quicksort Memory: 25kB
12. 0.014 0.025 ↓ 0.0 0 1

Hash Join (cost=62.79..87.94 rows=1 width=16) (actual time=0.024..0.025 rows=0 loops=1)

  • Hash Cond: (evdr.entity_variable_dimension_id = evd.id)
13. 0.011 0.011 ↓ 0.0 0 1

Seq Scan on entity_variable_dimension_responsibles evdr (cost=0.00..22.00 rows=1,200 width=12) (actual time=0.011..0.011 rows=0 loops=1)

14. 0.000 0.000 ↓ 0.0 0

Hash (cost=62.78..62.78 rows=1 width=12) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Seq Scan on entity_variable_dimensions evd (cost=0.00..62.78 rows=1 width=12) (never executed)

  • Filter: (NOT default_responsibles)
16. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.48..1.52 rows=16 width=4) (never executed)

  • Sort Key: ug.id
17. 0.000 0.000 ↓ 0.0 0

Seq Scan on user_groups ug (cost=0.00..1.16 rows=16 width=4) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Index Scan using entity_variable_pkey on entity_variables ev (cost=0.28..8.30 rows=1 width=12) (never executed)

  • Index Cond: (id = evd.entity_variable_id)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using variables_pkey on variables (cost=0.28..0.38 rows=1 width=8) (never executed)

  • Index Cond: (id = ev.variable_id)
20. 0.000 0.000 ↓ 0.0 0

Seq Scan on lnk_user_user_groups luug (cost=0.00..1.42 rows=42 width=8) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Sort (cost=1.45..1.49 rows=15 width=4) (never executed)

  • Sort Key: ugg.id
22. 0.000 0.000 ↓ 0.0 0

Seq Scan on user_groups ugg (cost=0.00..1.16 rows=15 width=4) (never executed)

  • Filter: active
23. 0.000 0.000 ↓ 0.0 0

Index Scan using users_pkey on users u (cost=0.14..0.44 rows=1 width=41) (never executed)

  • Index Cond: (id = COALESCE(evdr.user_id, luug.user_id))
24. 0.000 0.000 ↓ 0.0 0

Index Scan using variable_types_pkey on variable_types vt (cost=0.13..0.15 rows=1 width=4) (never executed)

  • Index Cond: (id = variables.type_id)
  • Filter: ((system_slug)::text = 'base'::text)
25.          

CTE entitiesDefault

26. 10.290 244.183 ↓ 1.1 6,253 1

Hash Join (cost=235.82..1,477.04 rows=5,591 width=53) (actual time=12.149..244.183 rows=6,253 loops=1)

  • Hash Cond: (variables_1.type_id = vt_1.id)
27. 57.572 233.877 ↑ 1.8 6,345 1

Hash Join (cost=234.78..1,384.45 rows=11,182 width=53) (actual time=12.124..233.877 rows=6,345 loops=1)

  • Hash Cond: ((ev_1.id = evd_1.entity_variable_id) AND (ed.dimension_id = evd_1.dimension_id))
28. 103.467 171.039 ↓ 1.9 63,592 1

Hash Join (cost=125.83..1,101.18 rows=33,194 width=57) (actual time=6.836..171.039 rows=63,592 loops=1)

  • Hash Cond: ((ed.entity_id = ev_1.entity_id) AND (variables_1.id = ev_1.variable_id))
29. 58.207 62.492 ↓ 1.3 63,676 1

Hash Join (cost=18.08..731.59 rows=49,849 width=53) (actual time=1.731..62.492 rows=63,676 loops=1)

  • Hash Cond: (variables_1.family_id = edf.family_id)
30. 2.578 2.578 ↑ 1.0 3,033 1

Seq Scan on variables variables_1 (cost=0.00..82.33 rows=3,033 width=12) (actual time=0.013..2.578 rows=3,033 loops=1)

31. 0.219 1.707 ↓ 1.0 237 1

Hash (cost=15.25..15.25 rows=226 width=49) (actual time=1.707..1.707 rows=237 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 27kB
32. 0.385 1.488 ↓ 1.0 237 1

Hash Left Join (cost=9.69..15.25 rows=226 width=49) (actual time=0.449..1.488 rows=237 loops=1)

  • Hash Cond: (COALESCE(ledfr.user_id, luug_1.user_id) = u_1.id)
33. 0.256 1.059 ↓ 1.0 237 1

Hash Left Join (cost=8.17..13.13 rows=226 width=20) (actual time=0.395..1.059 rows=237 loops=1)

  • Hash Cond: (ledfr.user_group_id = ug_1.id)
34. 0.114 0.622 ↑ 1.3 65 1

Hash Join (cost=4.72..7.56 rows=86 width=20) (actual time=0.206..0.622 rows=65 loops=1)

  • Hash Cond: (edf.entity_dimension_id = ed.id)
35. 0.116 0.476 ↑ 1.3 65 1

Hash Join (cost=3.59..6.04 rows=86 width=16) (actual time=0.168..0.476 rows=65 loops=1)

  • Hash Cond: (ledfr.entity_dimension_family_id = edf.id)
36. 0.146 0.264 ↑ 1.3 65 1

Hash Join (cost=1.35..3.55 rows=86 width=12) (actual time=0.065..0.264 rows=65 loops=1)

  • Hash Cond: (ledfr.user_group_id = ugg_1.id)
37. 0.080 0.080 ↑ 1.0 92 1

Seq Scan on lnk_entity_dimension_family_responsibles ledfr (cost=0.00..1.92 rows=92 width=12) (actual time=0.009..0.080 rows=92 loops=1)

38. 0.019 0.038 ↑ 1.0 15 1

Hash (cost=1.16..1.16 rows=15 width=4) (actual time=0.037..0.038 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
39. 0.019 0.019 ↑ 1.0 15 1

Seq Scan on user_groups ugg_1 (cost=0.00..1.16 rows=15 width=4) (actual time=0.006..0.019 rows=15 loops=1)

  • Filter: active
  • Rows Removed by Filter: 1
40. 0.049 0.096 ↑ 1.0 55 1

Hash (cost=1.55..1.55 rows=55 width=12) (actual time=0.096..0.096 rows=55 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
41. 0.047 0.047 ↑ 1.0 55 1

Seq Scan on entity_dimension_families edf (cost=0.00..1.55 rows=55 width=12) (actual time=0.006..0.047 rows=55 loops=1)

42. 0.019 0.032 ↑ 1.0 6 1

Hash (cost=1.06..1.06 rows=6 width=12) (actual time=0.031..0.032 rows=6 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
43. 0.013 0.013 ↑ 1.0 6 1

Seq Scan on entity_dimensions ed (cost=0.00..1.06 rows=6 width=12) (actual time=0.006..0.013 rows=6 loops=1)

44. 0.038 0.181 ↑ 1.0 42 1

Hash (cost=2.92..2.92 rows=42 width=8) (actual time=0.181..0.181 rows=42 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
45. 0.072 0.143 ↑ 1.0 42 1

Hash Right Join (cost=1.36..2.92 rows=42 width=8) (actual time=0.049..0.143 rows=42 loops=1)

  • Hash Cond: (luug_1.user_group_id = ug_1.id)
46. 0.037 0.037 ↑ 1.0 42 1

Seq Scan on lnk_user_user_groups luug_1 (cost=0.00..1.42 rows=42 width=8) (actual time=0.007..0.037 rows=42 loops=1)

47. 0.018 0.034 ↑ 1.0 16 1

Hash (cost=1.16..1.16 rows=16 width=4) (actual time=0.033..0.034 rows=16 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
48. 0.016 0.016 ↑ 1.0 16 1

Seq Scan on user_groups ug_1 (cost=0.00..1.16 rows=16 width=4) (actual time=0.004..0.016 rows=16 loops=1)

49. 0.021 0.044 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=41) (actual time=0.044..0.044 rows=23 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
50. 0.023 0.023 ↑ 1.0 23 1

Seq Scan on users u_1 (cost=0.00..1.23 rows=23 width=41) (actual time=0.006..0.023 rows=23 loops=1)

51. 2.600 5.080 ↑ 1.0 3,030 1

Hash (cost=62.30..62.30 rows=3,030 width=12) (actual time=5.079..5.080 rows=3,030 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 163kB
52. 2.480 2.480 ↑ 1.0 3,030 1

Seq Scan on entity_variables ev_1 (cost=0.00..62.30 rows=3,030 width=12) (actual time=0.010..2.480 rows=3,030 loops=1)

53. 2.576 5.266 ↑ 1.0 3,078 1

Hash (cost=62.78..62.78 rows=3,078 width=8) (actual time=5.265..5.266 rows=3,078 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 153kB
54. 2.690 2.690 ↑ 1.0 3,078 1

Seq Scan on entity_variable_dimensions evd_1 (cost=0.00..62.78 rows=3,078 width=8) (actual time=0.009..2.690 rows=3,078 loops=1)

  • Filter: default_responsibles
55. 0.005 0.016 ↑ 1.0 1 1

Hash (cost=1.02..1.02 rows=1 width=4) (actual time=0.016..0.016 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
56. 0.011 0.011 ↑ 1.0 1 1

Seq Scan on variable_types vt_1 (cost=0.00..1.02 rows=1 width=4) (actual time=0.009..0.011 rows=1 loops=1)

  • Filter: ((system_slug)::text = 'base'::text)
  • Rows Removed by Filter: 1
57.          

CTE entitiesUnitNotDefault

58. 0.004 0.141 ↓ 0.0 0 1

Merge Join (cost=55.07..60.18 rows=185 width=53) (actual time=0.140..0.141 rows=0 loops=1)

  • Merge Cond: (variables_2.id = ev_2.variable_id)
59. 0.005 0.054 ↑ 1,516.0 1 1

Nested Loop (cost=0.28..191.32 rows=1,516 width=4) (actual time=0.054..0.054 rows=1 loops=1)

  • Join Filter: (variables_2.type_id = vt_2.id)
60. 0.024 0.024 ↑ 3,033.0 1 1

Index Scan using variables_pkey on variables variables_2 (cost=0.28..144.80 rows=3,033 width=8) (actual time=0.024..0.024 rows=1 loops=1)

61. 0.005 0.025 ↑ 1.0 1 1

Materialize (cost=0.00..1.03 rows=1 width=4) (actual time=0.025..0.025 rows=1 loops=1)

62. 0.020 0.020 ↑ 1.0 1 1

Seq Scan on variable_types vt_2 (cost=0.00..1.02 rows=1 width=4) (actual time=0.019..0.020 rows=1 loops=1)

  • Filter: ((system_slug)::text = 'base'::text)
  • Rows Removed by Filter: 1
63. 0.014 0.083 ↓ 0.0 0 1

Sort (cost=54.53..55.45 rows=370 width=53) (actual time=0.083..0.083 rows=0 loops=1)

  • Sort Key: ev_2.variable_id
  • Sort Method: quicksort Memory: 25kB
64. 0.002 0.069 ↓ 0.0 0 1

Hash Left Join (cost=9.61..38.75 rows=370 width=53) (actual time=0.068..0.069 rows=0 loops=1)

  • Hash Cond: (COALESCE(evdr_1.user_id, luug_2.user_id) = u_2.id)
65. 0.002 0.067 ↓ 0.0 0 1

Hash Left Join (cost=8.09..36.23 rows=370 width=24) (actual time=0.066..0.067 rows=0 loops=1)

  • Hash Cond: (evdr_1.user_group_id = ug_2.id)
66. 0.013 0.065 ↓ 0.0 0 1

Hash Join (cost=4.64..31.60 rows=141 width=24) (actual time=0.065..0.065 rows=0 loops=1)

  • Hash Cond: (evdr_1.user_group_id = ugg_2.id)
67. 0.002 0.007 ↓ 0.0 0 1

Hash Join (cost=3.29..29.85 rows=150 width=24) (actual time=0.007..0.007 rows=0 loops=1)

  • Hash Cond: (evdr_1.entity_unit_variable_dimension_id = evd_2.id)
68. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on entity_unit_variable_dimension_responsibles evdr_1 (cost=0.00..22.00 rows=1,200 width=12) (actual time=0.005..0.005 rows=0 loops=1)

69. 0.000 0.000 ↓ 0.0 0

Hash (cost=3.28..3.28 rows=1 width=20) (never executed)

70. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=2.16..3.28 rows=1 width=20) (never executed)

  • Hash Cond: (eu.id = ev_2.entity_unit_id)
71. 0.000 0.000 ↓ 0.0 0

Seq Scan on entity_units eu (cost=0.00..1.08 rows=8 width=8) (never executed)

72. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.15..2.15 rows=1 width=16) (never executed)

73. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..2.15 rows=1 width=16) (never executed)

  • Join Filter: (evd_2.entity_unit_variable_id = ev_2.id)
74. 0.000 0.000 ↓ 0.0 0

Seq Scan on entity_unit_variable_dimensions evd_2 (cost=0.00..1.08 rows=1 width=12) (never executed)

  • Filter: (NOT default_responsibles)
75. 0.000 0.000 ↓ 0.0 0

Seq Scan on entity_unit_variables ev_2 (cost=0.00..1.03 rows=3 width=12) (never executed)

76. 0.024 0.045 ↑ 1.0 15 1

Hash (cost=1.16..1.16 rows=15 width=4) (actual time=0.044..0.045 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
77. 0.021 0.021 ↑ 1.0 15 1

Seq Scan on user_groups ugg_2 (cost=0.00..1.16 rows=15 width=4) (actual time=0.008..0.021 rows=15 loops=1)

  • Filter: active
  • Rows Removed by Filter: 1
78. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.92..2.92 rows=42 width=8) (never executed)

79. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=1.36..2.92 rows=42 width=8) (never executed)

  • Hash Cond: (luug_2.user_group_id = ug_2.id)
80. 0.000 0.000 ↓ 0.0 0

Seq Scan on lnk_user_user_groups luug_2 (cost=0.00..1.42 rows=42 width=8) (never executed)

81. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.16..1.16 rows=16 width=4) (never executed)

82. 0.000 0.000 ↓ 0.0 0

Seq Scan on user_groups ug_2 (cost=0.00..1.16 rows=16 width=4) (never executed)

83. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.23..1.23 rows=23 width=41) (never executed)

84. 0.000 0.000 ↓ 0.0 0

Seq Scan on users u_2 (cost=0.00..1.23 rows=23 width=41) (never executed)

85.          

CTE entitiesUnitDefault

86. 0.010 0.284 ↓ 0.0 0 1

Hash Join (cost=14.14..127.46 rows=35 width=53) (actual time=0.283..0.284 rows=0 loops=1)

  • Hash Cond: ((ev_3.id = evd_3.entity_unit_variable_id) AND (ed_1.dimension_id = evd_3.dimension_id))
87. 0.032 0.242 ↓ 0.0 0 1

Hash Join (cost=12.94..125.51 rows=134 width=57) (actual time=0.241..0.242 rows=0 loops=1)

  • Hash Cond: ((ed_1.entity_unit_id = ev_3.entity_unit_id) AND (edf_1.family_id = variables_3.family_id))
88. 0.002 0.013 ↓ 0.0 0 1

Hash Left Join (cost=9.89..82.73 rows=5,019 width=57) (actual time=0.012..0.013 rows=0 loops=1)

  • Hash Cond: (COALESCE(ledfr_1.user_id, luug_3.user_id) = u_3.id)
89. 0.002 0.011 ↓ 0.0 0 1

Hash Left Join (cost=8.38..67.76 rows=5,019 width=28) (actual time=0.010..0.011 rows=0 loops=1)

  • Hash Cond: (ledfr_1.user_group_id = ug_3.id)
90. 0.002 0.009 ↓ 0.0 0 1

Hash Join (cost=4.93..48.34 rows=1,912 width=28) (actual time=0.009..0.009 rows=0 loops=1)

  • Hash Cond: (ledfr_1.entity_unit_dimension_family_id = edf_1.id)
91. 0.001 0.007 ↓ 0.0 0 1

Hash Join (cost=1.35..37.21 rows=1,912 width=12) (actual time=0.007..0.007 rows=0 loops=1)

  • Hash Cond: (ledfr_1.user_group_id = ugg_3.id)
92. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on lnk_entity_unit_dimension_family_responsibles ledfr_1 (cost=0.00..30.40 rows=2,040 width=12) (actual time=0.005..0.006 rows=0 loops=1)

93. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.16..1.16 rows=15 width=4) (never executed)

94. 0.000 0.000 ↓ 0.0 0

Seq Scan on user_groups ugg_3 (cost=0.00..1.16 rows=15 width=4) (never executed)

  • Filter: active
95. 0.000 0.000 ↓ 0.0 0

Hash (cost=3.53..3.53 rows=4 width=24) (never executed)

96. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=2.27..3.53 rows=4 width=24) (never executed)

  • Hash Cond: (ed_1.entity_unit_id = eu_1.id)
97. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=1.09..2.34 rows=4 width=16) (never executed)

  • Hash Cond: (ed_1.id = edf_1.entity_unit_dimension_id)
98. 0.000 0.000 ↓ 0.0 0

Seq Scan on entity_unit_dimensions ed_1 (cost=0.00..1.12 rows=12 width=12) (never executed)

99. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.04..1.04 rows=4 width=12) (never executed)

100. 0.000 0.000 ↓ 0.0 0

Seq Scan on entity_unit_dimension_families edf_1 (cost=0.00..1.04 rows=4 width=12) (never executed)

101. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.08..1.08 rows=8 width=8) (never executed)

102. 0.000 0.000 ↓ 0.0 0

Seq Scan on entity_units eu_1 (cost=0.00..1.08 rows=8 width=8) (never executed)

103. 0.000 0.000 ↓ 0.0 0

Hash (cost=2.92..2.92 rows=42 width=8) (never executed)

104. 0.000 0.000 ↓ 0.0 0

Hash Right Join (cost=1.36..2.92 rows=42 width=8) (never executed)

  • Hash Cond: (luug_3.user_group_id = ug_3.id)
105. 0.000 0.000 ↓ 0.0 0

Seq Scan on lnk_user_user_groups luug_3 (cost=0.00..1.42 rows=42 width=8) (never executed)

106. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.16..1.16 rows=16 width=4) (never executed)

107. 0.000 0.000 ↓ 0.0 0

Seq Scan on user_groups ug_3 (cost=0.00..1.16 rows=16 width=4) (never executed)

108. 0.000 0.000 ↓ 0.0 0

Hash (cost=1.23..1.23 rows=23 width=41) (never executed)

109. 0.000 0.000 ↓ 0.0 0

Seq Scan on users u_3 (cost=0.00..1.23 rows=23 width=41) (never executed)

110. 0.011 0.197 ↓ 2.0 2 1

Hash (cost=3.03..3.03 rows=1 width=16) (actual time=0.197..0.197 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
111. 0.022 0.186 ↓ 2.0 2 1

Merge Join (cost=1.59..3.03 rows=1 width=16) (actual time=0.161..0.186 rows=2 loops=1)

  • Merge Cond: (variables_3.id = ev_3.variable_id)
112. 0.070 0.141 ↑ 79.8 19 1

Nested Loop (cost=0.28..191.32 rows=1,516 width=8) (actual time=0.025..0.141 rows=19 loops=1)

  • Join Filter: (variables_3.type_id = vt_3.id)
  • Rows Removed by Join Filter: 8
113. 0.044 0.044 ↑ 112.3 27 1

Index Scan using variables_pkey on variables variables_3 (cost=0.28..144.80 rows=3,033 width=12) (actual time=0.013..0.044 rows=27 loops=1)

114. 0.020 0.027 ↑ 1.0 1 27

Materialize (cost=0.00..1.03 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=27)

115. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on variable_types vt_3 (cost=0.00..1.02 rows=1 width=4) (actual time=0.005..0.007 rows=1 loops=1)

  • Filter: ((system_slug)::text = 'base'::text)
  • Rows Removed by Filter: 1
116. 0.013 0.023 ↑ 1.0 3 1

Sort (cost=1.05..1.06 rows=3 width=12) (actual time=0.020..0.023 rows=3 loops=1)

  • Sort Key: ev_3.variable_id
  • Sort Method: quicksort Memory: 25kB
117. 0.010 0.010 ↑ 1.0 3 1

Seq Scan on entity_unit_variables ev_3 (cost=0.00..1.03 rows=3 width=12) (actual time=0.007..0.010 rows=3 loops=1)

118. 0.013 0.032 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=8) (actual time=0.032..0.032 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
119. 0.019 0.019 ↑ 1.0 8 1

Seq Scan on entity_unit_variable_dimensions evd_3 (cost=0.00..1.08 rows=8 width=8) (actual time=0.011..0.019 rows=8 loops=1)

  • Filter: default_responsibles
120. 15.335 280.714 ↓ 1.1 6,231 1

HashAggregate (cost=247.05..305.18 rows=5,813 width=532) (actual time=274.646..280.714 rows=6,231 loops=1)

  • Group Key: "entitiesNotDefault".entity_id, "entitiesNotDefault".entity_unit_id, "entitiesNotDefault".dimension_id, "entitiesNotDefault".variable_id, "entitiesNotDefault".user_id
121. 8.863 265.379 ↓ 1.1 6,253 1

Append (cost=0.00..174.39 rows=5,813 width=532) (actual time=12.214..265.379 rows=6,253 loops=1)

122. 0.058 0.058 ↓ 0.0 0 1

CTE Scan on "entitiesNotDefault" (cost=0.00..0.04 rows=2 width=532) (actual time=0.057..0.058 rows=0 loops=1)

123. 256.029 256.029 ↓ 1.1 6,253 1

CTE Scan on "entitiesDefault" (cost=0.00..111.82 rows=5,591 width=532) (actual time=12.154..256.029 rows=6,253 loops=1)

124. 0.143 0.143 ↓ 0.0 0 1

CTE Scan on "entitiesUnitNotDefault" (cost=0.00..3.70 rows=185 width=532) (actual time=0.142..0.143 rows=0 loops=1)

125. 0.286 0.286 ↓ 0.0 0 1

CTE Scan on "entitiesUnitDefault" (cost=0.00..0.70 rows=35 width=532) (actual time=0.286..0.286 rows=0 loops=1)