explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lg57

Settings
# exclusive inclusive rows x rows loops node
1. 2.364 5,543.037 ↑ 1.0 436 1

Sort (cost=2,145,948.67..2,145,949.76 rows=436 width=526) (actual time=5,543.009..5,543.037 rows=436 loops=1)

  • Sort Key: ((SubPlan 1)), c.code
  • Sort Method: quicksort Memory: 358kB
  • Buffers: shared hit=838909
2. 2.165 5,540.673 ↑ 1.0 436 1

Seq Scan on course c (cost=0.00..2,145,929.56 rows=436 width=526) (actual time=19.094..5,540.673 rows=436 loops=1)

  • Filter: (active IS TRUE)
  • Rows Removed by Filter: 84
  • Buffers: shared hit=838901
3.          

SubPlan (forSeq Scan)

4. 1.308 5,538.508 ↑ 1.0 1 436

Aggregate (cost=4,921.75..4,921.76 rows=1 width=0) (actual time=12.703..12.703 rows=1 loops=436)

  • Buffers: shared hit=838864
5. 5,537.200 5,537.200 ↓ 0.0 0 436

Seq Scan on session (cost=0.00..4,921.75 rows=1 width=0) (actual time=12.642..12.700 rows=0 loops=436)

  • Filter: ((course_id = c.id) AND ((type_session)::text = 'LOCAL'::text) AND ((state)::text = 'OPEN'::text) AND (store_code = 14::bigint) AND (start_date >= ('now':
  • Rows Removed by Filter: 109009
  • Buffers: shared hit=838864