explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7NDr

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 20,341.839 ↑ 1.0 100 1

Limit (cost=0.25..9.68 rows=100 width=1,732) (actual time=20,341.744..20,341.839 rows=100 loops=1)

2. 13,660.823 20,341.828 ↑ 26,411.2 100 1

WindowAgg (cost=0.25..249,088.45 rows=2,641,115 width=1,732) (actual time=20,341.743..20,341.828 rows=100 loops=1)

3. 1,996.183 6,681.005 ↑ 1.0 2,641,029 1

Nested Loop Left Join (cost=0.25..239,844.55 rows=2,641,115 width=1,724) (actual time=0.034..6,681.005 rows=2,641,029 loops=1)

4. 969.631 2,043.793 ↑ 1.0 2,641,029 1

Merge Left Join (cost=0.19..82,613.52 rows=2,641,115 width=1,301) (actual time=0.023..2,043.793 rows=2,641,029 loops=1)

  • Merge Cond: ("UserLessonScene".user_id = "user".id)
5. 1,064.903 1,064.903 ↑ 1.0 2,641,029 1

Index Scan using user_lesson_scene_user_id_lesson_scene_id on user_lesson_scene "UserLessonScene" (cost=0.09..72,833.61 rows=2,641,115 width=29) (actual time=0.010..1,064.903 rows=2,641,029 loops=1)

6. 9.259 9.259 ↓ 1.0 10,961 1

Index Scan using user_pkey on "user" (cost=0.06..535.88 rows=10,833 width=1,272) (actual time=0.007..9.259 rows=10,961 loops=1)

7. 2,641.029 2,641.029 ↑ 1.0 1 2,641,029

Index Scan using lesson_scene_pkey on lesson_scene (cost=0.06..0.06 rows=1 width=423) (actual time=0.001..0.001 rows=1 loops=2,641,029)

  • Index Cond: ("UserLessonScene".lesson_scene_id = id)
Planning time : 0.417 ms
Execution time : 21,177.215 ms