explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ks39

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 710.241 186,676.587 ↑ 239.9 11,428 1

GroupAggregate (cost=2,869,946.63..2,959,050.90 rows=2,741,670 width=60) (actual time=185,292.431..186,676.587 rows=11,428 loops=1)

  • Group Key: b.list_id, (((a.metric)::text || (COALESCE(a.type, ''::character varying))::text)), a.as_of
2. 7,951.983 185,966.346 ↓ 1.5 4,032,888 1

Sort (cost=2,869,946.63..2,876,800.80 rows=2,741,670 width=68) (actual time=185,292.312..185,966.346 rows=4,032,888 loops=1)

  • Sort Key: (((a.metric)::text || (COALESCE(a.type, ''::character varying))::text)), a.as_of
  • Sort Method: external merge Disk: 326368kB
3. 1,878.605 178,014.363 ↓ 1.5 4,032,888 1

Nested Loop (cost=1.12..2,512,513.31 rows=2,741,670 width=68) (actual time=14.143..178,014.363 rows=4,032,888 loops=1)

4. 8.818 8.818 ↑ 1.0 447 1

Index Scan using securities_listconstituent_list_id_62b0f6d1 on securities_listconstituent b (cost=0.42..386.62 rows=447 width=25) (actual time=6.578..8.818 rows=447 loops=1)

  • Index Cond: (list_id = '38bf2b76-360c-4cba-aff5-d97b794729cf'::uuid)
5. 176,126.940 176,126.940 ↓ 1.5 9,022 447

Index Scan using campaigns_id_metric_as_of_temp on campaigns a (cost=0.70..5,543.30 rows=6,134 width=60) (actual time=0.196..394.020 rows=9,022 loops=447)

  • Index Cond: (id = (b.shareclass_id)::bpchar)
Planning time : 37.458 ms
Execution time : 186,760.122 ms