explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1x73

Settings
# exclusive inclusive rows x rows loops node
1. 13.416 323.339 ↑ 63.0 1 1

GroupAggregate (cost=80,357.65..123,278.35 rows=63 width=22) (actual time=323.339..323.339 rows=1 loops=1)

  • Group Key: a.metric
  • Buffers: shared hit=55243
2. 17.006 309.923 ↓ 51.8 40,119 1

Nested Loop (cost=80,357.65..123,263.86 rows=774 width=10) (actual time=223.218..309.923 rows=40,119 loops=1)

  • Buffers: shared hit=55243
3. 13.965 248.609 ↑ 3.4 212 1

Unique (cost=80,357.09..80,618.97 rows=719 width=14) (actual time=223.155..248.609 rows=212 loops=1)

  • Buffers: shared hit=14644
4. 46.571 234.644 ↓ 1.1 55,331 1

Sort (cost=80,357.09..80,488.03 rows=52,377 width=14) (actual time=223.153..234.644 rows=55,331 loops=1)

  • Sort Key: comcast_metrics_201901_development.ad_code, comcast_metrics_201901_development.month_code DESC
  • Sort Method: quicksort Memory: 4130kB
  • Buffers: shared hit=14644
5. 188.073 188.073 ↓ 1.1 55,331 1

Index Only Scan using comcast_v2_metricstable_development_idx on comcast_metrics_201901_development (cost=0.56..76,251.61 rows=52,377 width=14) (actual time=0.230..188.073 rows=55,331 loops=1)

  • Index Cond: ((ad_code = ANY ('{ADTSC-3091,ADTSC-3098,ADTSC-3110,ADTSC-3141,ADTSC-3159,ADTSC-3174,ADTSC-3178,AMAZRT-22481,AMAZRT-65840,AMAZRT-68199,AMAZRT-68615,APPLCO-20232,ATTTL-78455,ATTTL-80145,ATTTL-87491,ATTTL-88076,ATTTL-88124,ATTTL-88200,ATTTL-88490,ATTTL-88514,ATTTL
  • Heap Fetches: 0
  • Buffers: shared hit=14638
6. 44.308 44.308 ↓ 13.5 189 212

Index Scan using comcast_v2_metricstable_development_idx on comcast_metrics_201901_development a (cost=0.56..59.16 rows=14 width=24) (actual time=0.018..0.209 rows=189 loops=212)

  • Index Cond: (((ad_code)::text = (comcast_metrics_201901_development.ad_code)::text) AND (month_code = comcast_metrics_201901_development.month_code) AND (metric = 102))
  • Buffers: shared hit=40599