explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hBno

Settings
# exclusive inclusive rows x rows loops node
1. 0.323 0.978 ↓ 1.8 140 1

Sort (cost=36.01..36.21 rows=79 width=611) (actual time=0.956..0.978 rows=140 loops=1)

  • Sort Key: "learning_units->program_learning_unit".display_order, "learning_units->learning_modules".display_order, "learning_units->learning_modules->worksheets->learning_module_c".display_order
  • Sort Method: quicksort Memory: 126kB
2. 0.083 0.655 ↓ 1.8 140 1

Hash Right Join (cost=26.69..33.52 rows=79 width=611) (actual time=0.548..0.655 rows=140 loops=1)

  • Hash Cond: ("learning_units->learning_modules->videos->learning_module_compo".learning_module_id = "learning_units->learning_modules".id)
3. 0.046 0.117 ↑ 1.4 115 1

Hash Join (cost=5.59..11.01 rows=165 width=98) (actual time=0.071..0.117 rows=115 loops=1)

  • Hash Cond: ("learning_units->learning_modules->videos->learning_module_compo".video_id = "learning_units->learning_modules->videos".id)
4. 0.017 0.017 ↑ 1.0 165 1

Seq Scan on learning_module_component "learning_units->learning_modules->videos->learning_module_compo" (cost=0.00..3.65 rows=165 width=44) (actual time=0.003..0.017 rows=165 loops=1)

5. 0.033 0.054 ↑ 1.0 115 1

Hash (cost=4.15..4.15 rows=115 width=54) (actual time=0.054..0.054 rows=115 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
6. 0.021 0.021 ↑ 1.0 115 1

Seq Scan on video "learning_units->learning_modules->videos" (cost=0.00..4.15 rows=115 width=54) (actual time=0.003..0.021 rows=115 loops=1)

7. 0.102 0.455 ↓ 2.5 140 1

Hash (cost=20.42..20.42 rows=55 width=513) (actual time=0.455..0.455 rows=140 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 67kB
8. 0.057 0.353 ↓ 2.5 140 1

Hash Right Join (cost=14.56..20.42 rows=55 width=513) (actual time=0.277..0.353 rows=140 loops=1)

  • Hash Cond: ("learning_units->learning_modules->worksheets->learning_module_c".learning_module_id = "learning_units->learning_modules".id)
9. 0.046 0.088 ↑ 3.3 50 1

Hash Join (cost=3.12..7.89 rows=165 width=224) (actual time=0.057..0.088 rows=50 loops=1)

  • Hash Cond: ("learning_units->learning_modules->worksheets->learning_module_c".worksheet_id = "learning_units->learning_modules->worksheets".id)
10. 0.012 0.012 ↑ 1.0 165 1

Seq Scan on learning_module_component "learning_units->learning_modules->worksheets->learning_module_c" (cost=0.00..3.65 rows=165 width=44) (actual time=0.002..0.012 rows=165 loops=1)

11. 0.019 0.030 ↑ 1.0 50 1

Hash (cost=2.50..2.50 rows=50 width=180) (actual time=0.030..0.030 rows=50 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
12. 0.011 0.011 ↑ 1.0 50 1

Seq Scan on worksheet "learning_units->learning_modules->worksheets" (cost=0.00..2.50 rows=50 width=180) (actual time=0.002..0.011 rows=50 loops=1)

13. 0.071 0.208 ↓ 3.5 115 1

Hash (cost=11.02..11.02 rows=33 width=289) (actual time=0.208..0.208 rows=115 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 46kB
14. 0.069 0.137 ↓ 3.5 115 1

Hash Right Join (cost=4.11..11.02 rows=33 width=289) (actual time=0.071..0.137 rows=115 loops=1)

  • Hash Cond: ("learning_units->learning_modules".learning_unit_id = learning_units.id)
15. 0.011 0.011 ↑ 1.0 115 1

Seq Scan on learning_module "learning_units->learning_modules" (cost=0.00..6.15 rows=115 width=218) (actual time=0.002..0.011 rows=115 loops=1)

16. 0.008 0.057 ↓ 3.5 7 1

Hash (cost=4.08..4.08 rows=2 width=79) (actual time=0.057..0.057 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 0.004 0.049 ↓ 3.5 7 1

Nested Loop Left Join (cost=1.16..4.08 rows=2 width=79) (actual time=0.040..0.049 rows=7 loops=1)

  • Join Filter: (program.id = "learning_units->program_learning_unit".program_id)
18. 0.012 0.012 ↑ 1.0 1 1

Seq Scan on program (cost=0.00..1.10 rows=1 width=26) (actual time=0.011..0.012 rows=1 loops=1)

  • Filter: (((status)::text !~~ 'DELETED'::text) AND (id = '1'::bigint) AND (account_id = 1))
  • Rows Removed by Filter: 5
19. 0.017 0.033 ↑ 2.0 7 1

Hash Join (cost=1.16..2.80 rows=14 width=53) (actual time=0.026..0.033 rows=7 loops=1)

  • Hash Cond: ("learning_units->program_learning_unit".learning_unit_id = learning_units.id)
20. 0.007 0.007 ↑ 2.0 7 1

Seq Scan on program_learning_unit "learning_units->program_learning_unit" (cost=0.00..1.52 rows=14 width=28) (actual time=0.004..0.007 rows=7 loops=1)

  • Filter: (program_id = '1'::bigint)
  • Rows Removed by Filter: 35
21. 0.006 0.009 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=25) (actual time=0.009..0.009 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
22. 0.003 0.003 ↑ 1.0 7 1

Seq Scan on learning_unit learning_units (cost=0.00..1.07 rows=7 width=25) (actual time=0.001..0.003 rows=7 loops=1)

Planning time : 1.547 ms