explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cSI8

Settings
# exclusive inclusive rows x rows loops node
1. 4.429 167.680 ↓ 67.4 16,306 1

Unique (cost=3,580.97..3,582.81 rows=242 width=8) (actual time=161.106..167.680 rows=16,306 loops=1)

2. 16.587 163.251 ↓ 199.7 48,918 1

Sort (cost=3,580.97..3,581.59 rows=245 width=8) (actual time=161.104..163.251 rows=48,918 loops=1)

  • Sort Key: model_id, ((to_char((to_date((yearweek)::text, 'IYYYIW'::text) - '1 day'::interval), 'IYYYMM'::text))::integer)
  • Sort Method: quicksort Memory: 3,659kB
3. 146.664 146.664 ↓ 199.7 48,918 1

Seq Scan on model_20_80_store (cost=0.00..3,571.25 rows=245 width=8) (actual time=0.021..146.664 rows=48,918 loops=1)

  • Filter: ((store_id = 230) AND ((to_char((to_date((yearweek)::text, 'IYYYIW'::text) - '1 day'::interval), 'IYYYMM'::text))::integer >= (to_char('2020-09-20 00:00:00'::timestamp without time zone, 'IYYYMM'::text))::integer) AND ((to_char((to_date((yearweek)::text, 'IYYYIW'::text) - '1 day'::interval), 'IYYYMM'::text))::integer <= (to_char('2020-10-05 23:59:59'::timestamp without time zone, 'IYYYMM'::text))::integer))
Planning time : 0.143 ms
Execution time : 168.611 ms