explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6IkP

Settings
# exclusive inclusive rows x rows loops node
1. 2.846 17,634.930 ↓ 4.0 4 1

GroupAggregate (cost=3,280.81..3,280.88 rows=1 width=48) (actual time=17,633.438..17,634.930 rows=4 loops=1)

  • Group Key: (CASE b.performancelevel WHEN '1'::text THEN 'ADVANCED'::character varying WHEN '2'::text THEN 'PROFICIENT'::character varying WHEN '3'::text THEN 'BELOW BASIC'::character varying WHEN '4'::text THEN 'NEARLY MET STANDARD'::character varying WHEN '5'::text THEN 'NOT MET STANDARD'::character varying WHEN '6'::text THEN 'FAR BELOW BASIC'::character varying ELSE b.performancelevel END)
2. 0.652 17,632.084 ↓ 821.0 821 1

Sort (cost=3,280.81..3,280.81 rows=1 width=52) (actual time=17,631.993..17,632.084 rows=821 loops=1)

  • Sort Key: (CASE b.performancelevel WHEN '1'::text THEN 'ADVANCED'::character varying WHEN '2'::text THEN 'PROFICIENT'::character varying WHEN '3'::text THEN 'BELOW BASIC'::character varying WHEN '4'::text THEN 'NEARLY MET STANDARD'::character varying WHEN '5'::text THEN 'NOT MET STANDARD'::character varying WHEN '6'::text THEN 'FAR BELOW BASIC'::character varying ELSE b.performancelevel END)
  • Sort Method: quicksort Memory: 89kB
3. 846.257 17,631.432 ↓ 821.0 821 1

Nested Loop (cost=0.81..3,280.80 rows=1 width=52) (actual time=1,228.615..17,631.432 rows=821 loops=1)

  • Join Filter: (a.studentid = b.studentid)
  • Rows Removed by Join Filter: 11,984,063
4. 21.885 21.885 ↓ 1,654.0 1,654 1

Index Scan using assessnent_filters on assessment b (cost=0.56..3,255.51 rows=1 width=20) (actual time=10.920..21.885 rows=1,654 loops=1)

  • Index Cond: ((accountid = 2) AND ((assessmenttypecode)::text = 'ELPACs'::text) AND (date >= '2019-08-08'::date) AND (date <= '2020-05-29'::date))
  • Filter: (((name)::text ~~* '%WL%'::text) OR ((subjectareacode)::text = 'WL'::text))
  • Rows Removed by Filter: 3,308
5. 16,763.290 16,763.290 ↓ 3,623.0 7,246 1,654

Function Scan on ufn_indicators_corefilter a (cost=0.25..25.25 rows=2 width=16) (actual time=0.429..10.135 rows=7,246 loops=1,654)

  • Filter: ((gradelevelcode <= 12) AND ('sped'::text = ANY (subgroup)))
  • Rows Removed by Filter: 24,158
Planning time : 1.386 ms