explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t1CS

Settings
# exclusive inclusive rows x rows loops node
1. 139.811 9,979.916 ↓ 120.7 32,600 1

Nested Loop Left Join (cost=68.94..10,458.55 rows=270 width=49) (actual time=0.509..9,979.916 rows=32,600 loops=1)

  • Join Filter: e.default_responsibles
2. 69.640 190.505 ↓ 120.7 32,600 1

Nested Loop (cost=30.96..194.86 rows=270 width=18) (actual time=0.141..190.505 rows=32,600 loops=1)

3. 18.013 62.185 ↓ 120.7 6,520 1

Nested Loop (cost=30.67..157.71 rows=54 width=16) (actual time=0.129..62.185 rows=6,520 loops=1)

4. 11.652 18.072 ↓ 120.8 6,525 1

Nested Loop (cost=30.40..139.26 rows=54 width=16) (actual time=0.113..18.072 rows=6,525 loops=1)

5. 0.030 0.030 ↓ 5.0 5 1

Seq Scan on entity_units (cost=0.00..11.50 rows=1 width=8) (actual time=0.021..0.030 rows=5 loops=1)

  • Filter: (entity_id = 9)
6. 6.000 6.390 ↑ 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.088..1.278 rows=1,305 loops=5)

  • Recheck Cond: (entity_unit_id = entity_units.id)
  • Heap Blocks: exact=72
7. 0.390 0.390 ↑ 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.078..0.078 rows=1,305 loops=5)

  • Index Cond: (entity_unit_id = entity_units.id)
8. 26.100 26.100 ↑ 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.004..0.004 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 9,649.600 ↑ 1.0 1 32,600

Aggregate (cost=37.98..37.99 rows=1 width=1) (actual time=0.296..0.296 rows=1 loops=32,600)

11. 260.800 9,551.800 ↑ 1.0 1 32,600

Result (cost=5.49..37.98 rows=1 width=0) (actual time=0.186..0.293 rows=1 loops=32,600)

  • One-Time Filter: e.active
12. 163.000 9,291.000 ↑ 1.0 1 32,600

Nested Loop (cost=5.49..37.98 rows=1 width=0) (actual time=0.180..0.285 rows=1 loops=32,600)

  • Join Filter: (u.id = COALESCE(ledfr.user_id, luug.user_id))
  • Rows Removed by Join Filter: 1
13. 163.000 163.000 ↑ 1.0 1 32,600

Seq Scan on users u (cost=0.00..1.05 rows=1 width=4) (actual time=0.003..0.005 rows=1 loops=32,600)

  • Filter: ((external_id)::text = '79f30646-d7b1-11e8-8dbb-f2801f1b9fd1'::text)
  • Rows Removed by Filter: 5
14. 391.200 8,965.000 ↑ 1.0 2 32,600

Nested Loop Left Join (cost=5.49..36.90 rows=2 width=8) (actual time=0.152..0.275 rows=2 loops=32,600)

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

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

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

Nested Loop (cost=5.04..35.01 rows=1 width=4) (actual time=0.110..0.194 rows=1 loops=32,600)

17. 1,401.800 6,063.600 ↑ 1.0 1 32,600

Nested Loop (cost=4.90..26.83 rows=1 width=8) (actual time=0.105..0.186 rows=1 loops=32,600)

18. 1,467.000 3,031.800 ↓ 2.1 25 32,600

Nested Loop (cost=4.75..24.37 rows=12 width=8) (actual time=0.027..0.093 rows=25 loops=32,600)

19. 260.800 456.400 ↑ 1.0 1 32,600

Nested Loop (cost=0.28..9.33 rows=1 width=4) (actual time=0.011..0.014 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

Seq Scan on variable_types vt (cost=0.00..1.02 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 lnk_dimension_units_pkey on entity_unit_dimensions ed (cost=0.15..0.20 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. 978.000 1,956.000 ↑ 1.0 2 32,600

Hash Right Join (cost=0.17..1.54 rows=2 width=8) (actual time=0.028..0.060 rows=2 loops=32,600)

  • Hash Cond: (luug.user_group_id = ug.id)
28. 717.200 717.200 ↑ 1.0 27 32,600

Seq Scan on lnk_user_user_groups luug (cost=0.00..1.27 rows=27 width=8) (actual time=0.002..0.022 rows=27 loops=32,600)

29. 130.400 260.800 ↑ 1.0 1 32,600

Hash (cost=0.16..0.16 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=32,600)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 130.400 130.400 ↑ 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.003..0.004 rows=1 loops=32,600)

  • Index Cond: (id = ledfr.user_group_id)
  • Filter: (active IS NOT FALSE)
Planning time : 5.661 ms