explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JNjz

Settings
# exclusive inclusive rows x rows loops node
1. 106.967 7,820.456 ↓ 120.7 32,600 1

Nested Loop Left Join (cost=80.73..13,641.91 rows=270 width=49) (actual time=0.540..7,820.456 rows=32,600 loops=1)

  • Join Filter: e.default_responsibles
2. 64.628 182.889 ↓ 120.7 32,600 1

Nested Loop (cost=31.10..233.60 rows=270 width=18) (actual time=0.124..182.889 rows=32,600 loops=1)

3. 22.374 59.581 ↓ 120.7 6,520 1

Nested Loop (cost=30.82..196.45 rows=54 width=16) (actual time=0.113..59.581 rows=6,520 loops=1)

4. 11.175 17.632 ↓ 120.8 6,525 1

Nested Loop (cost=30.54..178.00 rows=54 width=16) (actual time=0.100..17.632 rows=6,525 loops=1)

5. 0.022 0.022 ↓ 5.0 5 1

Index Scan using "EntityUnit_pkey" on entity_units (cost=0.14..50.24 rows=1 width=8) (actual time=0.012..0.022 rows=5 loops=1)

  • Filter: (entity_id = 9)
6. 6.115 6.435 ↑ 1.0 1,305 5

Bitmap Heap Scan on entity_unit_variables entityunitvariables (cost=30.40..114.71 rows=1,305 width=12) (actual time=0.072..1.287 rows=1,305 loops=5)

  • Recheck Cond: (entity_unit_id = entity_units.id)
  • Heap Blocks: exact=72
7. 0.320 0.320 ↑ 1.0 1,305 5

Bitmap Index Scan on entity_unit_variables_entity_unit_id_variable_id_key (cost=0.00..30.07 rows=1,305 width=0) (actual time=0.064..0.064 rows=1,305 loops=5)

  • Index Cond: (entity_unit_id = entity_units.id)
8. 19.575 19.575 ↑ 1.0 1 6,525

Index Scan using idx_variables_id on variables (cost=0.28..0.34 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=6,525)

  • Index Cond: (id = entityunitvariables.variable_id)
  • Filter: (status_id <> 4)
  • Rows Removed by Filter: 0
9. 58.680 58.680 ↑ 1.0 5 6,520

Index Scan using idx_entity_unit_variable_entity_variable_dimensions on entity_unit_variable_dimensions e (cost=0.29..0.64 rows=5 width=10) (actual time=0.003..0.009 rows=5 loops=6,520)

  • Index Cond: (entity_unit_variable_id = entityunitvariables.id)
10. 97.800 7,530.600 ↑ 1.0 1 32,600

Aggregate (cost=49.63..49.64 rows=1 width=1) (actual time=0.231..0.231 rows=1 loops=32,600)

11. 130.400 7,432.800 ↑ 1.0 1 32,600

Result (cost=5.84..49.62 rows=1 width=0) (actual time=0.135..0.228 rows=1 loops=32,600)

  • One-Time Filter: e.active
12. 226.600 7,302.400 ↑ 1.0 1 32,600

Nested Loop (cost=5.84..49.62 rows=1 width=0) (actual time=0.133..0.224 rows=1 loops=32,600)

13. 195.600 6,943.800 ↑ 1.0 2 32,600

Nested Loop Left Join (cost=5.71..48.41 rows=2 width=8) (actual time=0.121..0.213 rows=2 loops=32,600)

14. 163.000 6,617.800 ↑ 1.0 1 32,600

Nested Loop Left Join (cost=5.57..46.22 rows=1 width=8) (actual time=0.116..0.203 rows=1 loops=32,600)

15. 130.400 6,389.600 ↑ 1.0 1 32,600

Nested Loop Left Join (cost=5.43..46.05 rows=1 width=8) (actual time=0.111..0.196 rows=1 loops=32,600)

16. 163.000 6,128.800 ↑ 1.0 1 32,600

Nested Loop (cost=5.16..45.71 rows=1 width=4) (actual time=0.106..0.188 rows=1 loops=32,600)

17. 1,304.000 5,868.000 ↑ 1.0 1 32,600

Nested Loop (cost=5.01..37.54 rows=1 width=8) (actual time=0.101..0.180 rows=1 loops=32,600)

18. 1,467.000 2,934.000 ↓ 2.1 25 32,600

Nested Loop (cost=4.88..35.51 rows=12 width=8) (actual time=0.025..0.090 rows=25 loops=32,600)

19. 163.000 358.600 ↑ 1.0 1 32,600

Nested Loop (cost=0.41..20.47 rows=1 width=4) (actual time=0.008..0.011 rows=1 loops=32,600)

  • Join Filter: (v.type_id = vt.id)
20. 130.400 130.400 ↑ 1.0 1 32,600

Index Scan using idx_variables_id on variables v (cost=0.28..8.30 rows=1 width=8) (actual time=0.003..0.004 rows=1 loops=32,600)

  • Index Cond: (id = entityunitvariables.variable_id)
  • Filter: (status_id <> 4)
21. 65.200 65.200 ↑ 1.0 1 32,600

Index Scan using variable_types_pkey on variable_types vt (cost=0.13..12.16 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=32,600)

  • Filter: ((system_slug)::text = 'base'::text)
  • Rows Removed by Filter: 1
22. 945.400 1,108.400 ↑ 1.0 25 32,600

Bitmap Heap Scan on entity_unit_dimension_families edf (cost=4.47..14.78 rows=25 width=12) (actual time=0.009..0.034 rows=25 loops=32,600)

  • Recheck Cond: (family_id = v.family_id)
  • Heap Blocks: exact=299900
23. 163.000 163.000 ↑ 1.0 25 32,600

Bitmap Index Scan on idx_entity_unit_dimension_families_family_id (cost=0.00..4.46 rows=25 width=0) (actual time=0.005..0.005 rows=25 loops=32,600)

  • Index Cond: (family_id = v.family_id)
24. 1,630.000 1,630.000 ↓ 0.0 0 815,000

Index Scan using idx_entity_unit_dimensions_id on entity_unit_dimensions ed (cost=0.14..0.17 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=815,000)

  • Index Cond: (id = edf.entity_unit_dimension_id)
  • Filter: ((dimension_id = e.dimension_id) AND (entity_unit_id = entityunitvariables.entity_unit_id))
  • Rows Removed by Filter: 1
25. 97.800 97.800 ↑ 1.0 1 32,600

Index Scan using "EntityUnit_pkey" on entity_units eu (cost=0.14..8.16 rows=1 width=4) (actual time=0.002..0.003 rows=1 loops=32,600)

  • Index Cond: (id = entityunitvariables.entity_unit_id)
  • Filter: (entity_id = 9)
26. 130.400 130.400 ↑ 1.0 1 32,600

Index Scan using idx_entity_unit_dimension_family_responsibles_entity_dimension_ on lnk_entity_unit_dimension_family_responsibles ledfr (cost=0.28..0.33 rows=1 width=12) (actual time=0.003..0.004 rows=1 loops=32,600)

  • Index Cond: (entity_unit_dimension_family_id = edf.id)
27. 65.200 65.200 ↑ 1.0 1 32,600

Index Scan using user_groups_pkey on user_groups ug (cost=0.14..0.16 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=32,600)

  • Index Cond: (id = ledfr.user_group_id)
  • Filter: (active IS NOT FALSE)
28. 130.400 130.400 ↑ 1.0 2 32,600

Index Scan using idx_lnk_user_user_groups_user_group_id on lnk_user_user_groups luug (cost=0.14..2.17 rows=2 width=8) (actual time=0.002..0.004 rows=2 loops=32,600)

  • Index Cond: (user_group_id = ug.id)
29. 132.000 132.000 ↓ 0.0 0 66,000

Index Scan using users_pkey on users u (cost=0.13..0.59 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=66,000)

  • Index Cond: (id = COALESCE(ledfr.user_id, luug.user_id))
  • Filter: ((external_id)::text = '79f30646-d7b1-11e8-8dbb-f2801f1b9fd1'::text)
  • Rows Removed by Filter: 1
Planning time : 5.244 ms