explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ufIH

Settings
# exclusive inclusive rows x rows loops node
1. 0.290 0.816 ↓ 1.8 140 1

Sort (cost=36.01..36.21 rows=79 width=611) (actual time=0.805..0.816 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.058 0.526 ↓ 1.8 140 1

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

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

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

  • Hash Cond: ("learning_units->learning_modules->videos->learning_module_compo".video_id = "learning_units->learning_modules->videos".id)
4. 0.014 0.014 ↑ 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.002..0.014 rows=165 loops=1)

5. 0.027 0.050 ↑ 1.0 115 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
6. 0.023 0.023 ↑ 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.002..0.023 rows=115 loops=1)

7. 0.087 0.353 ↓ 2.5 140 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 67kB
8. 0.047 0.266 ↓ 2.5 140 1

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

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

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

  • Hash Cond: ("learning_units->learning_modules->worksheets->learning_module_c".worksheet_id = "learning_units->learning_modules->worksheets".id)
10. 0.011 0.011 ↑ 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.011 rows=165 loops=1)

11. 0.022 0.031 ↑ 1.0 50 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
12. 0.009 0.009 ↑ 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.001..0.009 rows=50 loops=1)

13. 0.039 0.149 ↓ 3.5 115 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 46kB
14. 0.056 0.110 ↓ 3.5 115 1

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

  • Hash Cond: ("learning_units->learning_modules".learning_unit_id = learning_units.id)
15. 0.012 0.012 ↑ 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.001..0.012 rows=115 loops=1)

16. 0.004 0.042 ↓ 3.5 7 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 0.003 0.038 ↓ 3.5 7 1

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

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

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

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

Hash Join (cost=1.16..2.80 rows=14 width=53) (actual time=0.018..0.022 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.008 ↑ 1.0 7 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
22. 0.002 0.002 ↑ 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.002 rows=7 loops=1)

Planning time : 0.868 ms