explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QDPs

Settings
# exclusive inclusive rows x rows loops node
1. 4.451 163.315 ↓ 67.4 16,306 1

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

2. 16.659 158.864 ↓ 199.7 48,918 1

Sort (cost=3,580.97..3,581.59 rows=245 width=8) (actual time=156.704..158.864 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. 142.205 142.205 ↓ 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.015..142.205 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.106 ms
Execution time : 164.224 ms