explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vmZ3

Settings
# exclusive inclusive rows x rows loops node
1. 357.028 357.028 ↑ 1.1 21 1

CTE Scan on listed (cost=155,446.74..155,448.90 rows=24 width=10) (actual time=223.070..357.028 rows=21 loops=1)

  • Filter: (make_date((year)::integer, (quarter * 3), 1) <= '2019-06-01'::date)
  • Rows Removed by Filter: 1
2.          

CTE listed

3. 89.155 356.974 ↑ 3.3 22 1

GroupAggregate (cost=152,848.14..155,446.74 rows=72 width=10) (actual time=223.060..356.974 rows=22 loops=1)

  • Group Key: calendar_metric_properties.year, ((date_part('quarter'::text, (to_date((calendar_metric_properties.month)::text, 'MM'::text))::timestamp without time zone))::integer)
4. 111.997 267.819 ↑ 1.2 207,930 1

Sort (cost=152,848.14..153,497.29 rows=259,662 width=10) (actual time=222.618..267.819 rows=207,930 loops=1)

  • Sort Key: calendar_metric_properties.year, ((date_part('quarter'::text, (to_date((calendar_metric_properties.month)::text, 'MM'::text))::timestamp without time zone))::integer)
  • Sort Method: quicksort Memory: 15891kB
5. 155.822 155.822 ↑ 1.2 207,930 1

Index Scan using cm_cityid_date on calendar_metric_properties (cost=0.57..129,496.38 rows=259,662 width=10) (actual time=0.023..155.822 rows=207,930 loops=1)

  • Index Cond: (city_id = 59380)
Planning time : 0.143 ms
Execution time : 358.467 ms