explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Zxcv

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 0.194 ↓ 0.0 0 1

Nested Loop Left Join (cost=11.04..81.08 rows=2 width=457) (actual time=0.191..0.194 rows=0 loops=1)

2. 0.007 0.186 ↓ 0.0 0 1

Nested Loop Left Join (cost=10.77..47.23 rows=1 width=506) (actual time=0.182..0.186 rows=0 loops=1)

  • Join Filter: (l.lang_id = ac.lang_id)
3. 0.007 0.179 ↓ 0.0 0 1

Nested Loop Left Join (cost=10.48..46.87 rows=1 width=502) (actual time=0.175..0.179 rows=0 loops=1)

  • Join Filter: (sl.lang_id = l.lang_id)
4. 0.008 0.172 ↓ 0.0 0 1

Nested Loop Left Join (cost=10.34..46.63 rows=1 width=486) (actual time=0.168..0.172 rows=0 loops=1)

5. 0.007 0.164 ↓ 0.0 0 1

Nested Loop Left Join (cost=10.07..46.34 rows=1 width=480) (actual time=0.161..0.164 rows=0 loops=1)

  • Join Filter: (iiol2.lang_id = l.lang_id)
6. 0.007 0.157 ↓ 0.0 0 1

Nested Loop Left Join (cost=9.78..45.89 rows=1 width=386) (actual time=0.154..0.157 rows=0 loops=1)

7. 0.008 0.150 ↓ 0.0 0 1

Nested Loop Left Join (cost=9.49..45.54 rows=1 width=378) (actual time=0.146..0.150 rows=0 loops=1)

  • Join Filter: (iiol.lang_id = l.lang_id)
8. 0.007 0.142 ↓ 0.0 0 1

Nested Loop Left Join (cost=9.21..45.10 rows=1 width=284) (actual time=0.139..0.142 rows=0 loops=1)

9. 0.022 0.135 ↓ 0.0 0 1

Nested Loop Left Join (cost=8.92..36.79 rows=1 width=278) (actual time=0.132..0.135 rows=0 loops=1)

10. 0.008 0.113 ↓ 0.0 0 1

Nested Loop Left Join (cost=8.63..28.49 rows=1 width=272) (actual time=0.110..0.113 rows=0 loops=1)

  • Join Filter: (a.activity_id = am.activity_id)
11. 0.007 0.105 ↓ 0.0 0 1

Nested Loop (cost=8.48..20.31 rows=1 width=255) (actual time=0.102..0.105 rows=0 loops=1)

12. 0.008 0.098 ↓ 0.0 0 1

Nested Loop (cost=8.33..12.13 rows=1 width=224) (actual time=0.094..0.098 rows=0 loops=1)

13. 0.033 0.090 ↓ 0.0 0 1

Hash Join (cost=8.18..10.03 rows=2 width=224) (actual time=0.086..0.090 rows=0 loops=1)

  • Hash Cond: (tdl.timeofday_id = a.timeofday_id)
14. 0.033 0.033 ↑ 66.0 1 1

Seq Scan on timeofday_lang tdl (cost=0.00..1.66 rows=66 width=31) (actual time=0.030..0.033 rows=1 loops=1)

15. 0.008 0.024 ↓ 0.0 0 1

Hash (cost=8.17..8.17 rows=1 width=197) (actual time=0.021..0.024 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
16. 0.016 0.016 ↓ 0.0 0 1

Index Scan using activity_pkey on activity a (cost=0.15..8.17 rows=1 width=197) (actual time=0.012..0.016 rows=0 loops=1)

  • Index Cond: (activity_id = 2222)
17. 0.000 0.000 ↓ 0.0 0

Index Scan using lang_pkey on lang l (cost=0.15..0.90 rows=1 width=4) (never executed)

  • Index Cond: (lang_id = tdl.lang_id)
  • Filter: (locale = 'en_US'::text)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using activity_day_class_id_activity_date_key on activity_day ad (cost=0.15..8.17 rows=1 width=39) (never executed)

  • Index Cond: ((class_id = a.class_id) AND (activity_date = a.activity_date))
19. 0.000 0.000 ↓ 0.0 0

Index Scan using activity_metadata_activity_id_unique on activity_metadata am (cost=0.15..8.17 rows=1 width=21) (never executed)

  • Index Cond: (activity_id = 2222)
20. 0.000 0.000 ↓ 0.0 0

Index Scan using investigation_item_pkey on investigation_item ii (cost=0.29..8.30 rows=1 width=10) (never executed)

  • Index Cond: (investigation_item_id = a.investigation_item_id)
21. 0.000 0.000 ↓ 0.0 0

Index Scan using investigation_item_option_pkey on investigation_item_option iio (cost=0.29..8.30 rows=1 width=10) (never executed)

  • Index Cond: (investigation_item_option_id = a.investigation_item_option_id)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using investigation_item_option_lang_unique on investigation_item_option_lang iiol (cost=0.29..0.42 rows=1 width=106) (never executed)

  • Index Cond: (investigation_item_option_id = iio.investigation_item_option_id)
23. 0.000 0.000 ↓ 0.0 0

Index Scan using investigation_item_option_investigation_item_id_idx on investigation_item_option iio2 (cost=0.29..0.35 rows=1 width=12) (never executed)

  • Index Cond: ((investigation_item_id = ii.investigation_item_id) AND (option_id = 1))
24. 0.000 0.000 ↓ 0.0 0

Index Scan using investigation_item_option_lang_unique on investigation_item_option_lang iiol2 (cost=0.29..0.44 rows=1 width=106) (never executed)

  • Index Cond: (investigation_item_option_id = iio2.investigation_item_option_id)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using study_investigation_pkey on investigation i (cost=0.27..0.29 rows=1 width=10) (never executed)

  • Index Cond: (investigation_id = ii.investigation_id)
26. 0.000 0.000 ↓ 0.0 0

Index Scan using study_lang_unique on study_lang sl (cost=0.14..0.21 rows=2 width=24) (never executed)

  • Index Cond: (study_id = i.study_id)
27. 0.000 0.000 ↓ 0.0 0

Index Scan using asset_content_curriculum_asset_id on asset_content ac (cost=0.28..0.34 rows=2 width=10) (never executed)

  • Index Cond: (COALESCE(iio.curriculum_asset_id, iio2.curriculum_asset_id, 0) = curriculum_asset_id)
28. 0.000 0.000 ↓ 0.0 0

Index Scan using investigation_lang_unique on investigation_lang il (cost=0.28..0.45 rows=2 width=57) (never executed)

  • Index Cond: (investigation_id = i.investigation_id)
29.          

SubPlan (for Nested Loop Left Join)

30. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.03 rows=1 width=32) (never executed)

31. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.31..8.32 rows=1 width=8) (never executed)

32. 0.000 0.000 ↓ 0.0 0

Index Scan using investigation_item_option_investigation_item_id_idx on investigation_item_option (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Index Cond: (investigation_item_id = ii.investigation_item_id)
33. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=8.31..8.32 rows=1 width=32) (never executed)

34. 0.000 0.000 ↓ 0.0 0

Index Scan using investigation_item_option_investigation_item_id_idx on investigation_item_option investigation_item_option_1 (cost=0.29..8.30 rows=1 width=4) (never executed)

  • Index Cond: (investigation_item_id = ii.investigation_item_id)
Planning time : 47.767 ms