explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zUop : Optimization for: plan #ks39

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 227.865 1,609.686 ↑ 63.8 10,377 1

GroupAggregate (cost=440,888.46..462,403.40 rows=661,998 width=60) (actual time=1,220.994..1,609.686 rows=10,377 loops=1)

  • Group Key: b.list_id, (((a.metric)::text || (COALESCE(a.type, ''::character varying))::text)), a.date
2. 1,027.285 1,381.821 ↓ 1.4 905,001 1

Sort (cost=440,888.46..442,543.46 rows=661,998 width=68) (actual time=1,220.917..1,381.821 rows=905,001 loops=1)

  • Sort Key: (((a.metric)::text || (COALESCE(a.type, ''::character varying))::text)), a.date
  • Sort Method: quicksort Memory: 151842kB
3. 194.814 354.536 ↓ 1.4 905,001 1

Nested Loop (cost=0.99..376,884.95 rows=661,998 width=68) (actual time=0.049..354.536 rows=905,001 loops=1)

4. 0.143 0.143 ↓ 2.9 447 1

Index Only Scan using securities_listconstituent_shareclass_id_list_id on securities_listconstituent b (cost=0.42..33.64 rows=152 width=25) (actual time=0.020..0.143 rows=447 loops=1)

  • Index Cond: (list_id = '38bf2b76-360c-4cba-aff5-d97b794729cf'::uuid)
  • Heap Fetches: 0
5. 159.579 159.579 ↑ 2.1 2,025 447

Index Scan using campaigns_id_metric_date on campaigns a (cost=0.57..2,425.02 rows=4,338 width=63) (actual time=0.013..0.357 rows=2,025 loops=447)

  • Index Cond: (id = (b.shareclass_id)::bpchar)
Planning time : 0.924 ms
Execution time : 1,616.969 ms