explain.depesz.com

PostgreSQL's explain analyze made readable

Result: gZb5

Settings
# exclusive inclusive rows x rows loops node
1. 26.746 35,744.911 ↑ 39.4 38 1

Seq Scan on courses (cost=0.00..152,268,920.81 rows=1,497 width=776) (actual time=143.369..35,744.911 rows=38 loops=1)

  • Filter: ((seq_sessions_count IS NOT NULL) AND (seq_sessions_count <> 0) AND (seq_sessions_count <> (SubPlan 1)))
  • Rows Removed by Filter: 27121
2.          

SubPlan (forSeq Scan)

3. 7.525 35,718.165 ↑ 1.0 1 1,505

Aggregate (cost=5,606.84..5,606.85 rows=1 width=8) (actual time=23.733..23.733 rows=1 loops=1,505)

4. 10.535 35,710.640 ↑ 1.0 2 1,505

Append (cost=0.00..5,606.84 rows=2 width=0) (actual time=10.967..23.728 rows=2 loops=1,505)

5. 34,019.020 34,019.020 ↓ 2.0 2 1,505

Seq Scan on course_sessions (cost=0.00..5,291.20 rows=1 width=0) (actual time=10.926..22.604 rows=2 loops=1,505)

  • Filter: ((finished IS FALSE) AND (course_id = courses.id) AND ((settings ->> 'navigation'::text) = '1'::text))
  • Rows Removed by Filter: 88750
6. 1,681.085 1,681.085 ↓ 0.0 0 1,505

Seq Scan on program_sessions (cost=0.00..315.64 rows=1 width=0) (actual time=1.068..1.117 rows=0 loops=1,505)

  • Filter: ((finished IS FALSE) AND (course_id = courses.id) AND ((settings ->> 'navigation'::text) = '1'::text))
  • Rows Removed by Filter: 3867