explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FTOp : Optimization for: Optimization for: Optimization for: plan #学员列表; plan #P3Yf; plan #kFhO

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.649 13.606 ↓ 1.5 350 1

WindowAgg (cost=1.85..1,426.49 rows=239 width=248) (actual time=0.251..13.606 rows=350 loops=1)

2. 0.321 12.957 ↓ 1.5 350 1

Nested Loop (cost=1.85..1,422.30 rows=239 width=240) (actual time=0.108..12.957 rows=350 loops=1)

3. 1.314 11.580 ↓ 1.9 528 1

Nested Loop (cost=1.57..1,333.48 rows=279 width=240) (actual time=0.099..11.580 rows=528 loops=1)

4. 0.460 7.098 ↓ 1.9 528 1

Nested Loop (cost=1.29..1,238.41 rows=279 width=160) (actual time=0.087..7.098 rows=528 loops=1)

5. 0.213 2.942 ↓ 1.9 528 1

Nested Loop (cost=1.00..1,153.41 rows=279 width=127) (actual time=0.074..2.942 rows=528 loops=1)

6. 0.086 0.629 ↑ 1.0 100 1

Nested Loop Left Join (cost=0.58..403.37 rows=100 width=103) (actual time=0.060..0.629 rows=100 loops=1)

7. 0.343 0.343 ↑ 1.0 100 1

Index Scan Backward using user_student_pkey on user_student (cost=0.29..172.42 rows=100 width=89) (actual time=0.047..0.343 rows=100 loops=1)

  • Index Cond: (id = ANY ('{158065,158063,158061,158060,158059,158058,158057,158056,158055,157784,157723,157721,157720,157195,157190,151148,150067,150057,150055,150046,149956,149865,149864,149863,149862,149861,149860,149859,149858,149857,149856,149855,149854,149853,149852,149851,149850,149849,149848,149847,149846,149845,149844,149843,149842,149841,149840,149839,149838,149837,149836,149835,149834,149833,149832,149831,149830,149829,149828,149827,149826,149825,149824,149823,149822,149821,149820,149819,149818,149817,149816,149815,149814,149813,149812,149811,149810,149809,149808,149807,149806,149805,149804,149803,149802,149801,149800,149799,149798,149797,149796,149795,149794,149793,149792,149791,149790,149789,149788,149787}'::bigint[]))
8. 0.200 0.200 ↑ 1.0 1 100

Index Scan using user_student_location_user_student_id_idx on user_student_location (cost=0.29..2.31 rows=1 width=22) (actual time=0.002..0.002 rows=1 loops=100)

  • Index Cond: (user_student_id = user_student.id)
9. 2.100 2.100 ↑ 1.2 5 100

Index Scan using curriculum_record_student_id_status_idx on curriculum_record (cost=0.42..7.44 rows=6 width=49) (actual time=0.017..0.021 rows=5 loops=100)

  • Index Cond: ((student_id)::text = (user_student.user_student_id)::text)
  • Filter: (status = ANY ('{2,5}'::integer[]))
  • Rows Removed by Filter: 0
10. 3.696 3.696 ↑ 1.0 1 528

Index Scan using class_class_id_idx on class (cost=0.29..0.30 rows=1 width=82) (actual time=0.007..0.007 rows=1 loops=528)

  • Index Cond: ((class_id)::text = (curriculum_record.class_id)::text)
11. 3.168 3.168 ↑ 1.0 1 528

Index Scan using curriculum_curriculum_id_idx on curriculum (cost=0.28..0.34 rows=1 width=105) (actual time=0.006..0.006 rows=1 loops=528)

  • Index Cond: ((curriculum_id)::text = (class.curriculum_id)::text)
12. 1.056 1.056 ↑ 1.0 1 528

Index Only Scan using curriculum_genre_curriculum_id_genre_idx on curriculum_genre (cost=0.28..0.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=528)

  • Index Cond: (curriculum_id = curriculum.id)
  • Filter: (genre = ANY ('{1,8}'::bigint[]))
  • Rows Removed by Filter: 0
  • Heap Fetches: 395
Planning time : 3.021 ms
Execution time : 13.731 ms