explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SNjT : Optimization for: plan #mduB

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.262 214.864 ↑ 214.5 526 1

Sort (cost=116,162.88..116,444.95 rows=112,829 width=84) (actual time=214.824..214.864 rows=526 loops=1)

  • Sort Key: (sum(a.flow)) DESC
  • Sort Method: quicksort Memory: 91kB
2. 23.313 214.602 ↑ 214.5 526 1

HashAggregate (cost=105,566.10..106,694.39 rows=112,829 width=84) (actual time=214.385..214.602 rows=526 loops=1)

  • Group Key: c.list_id, b.fundfamilyname
3. 23.420 191.289 ↑ 1.3 88,199 1

Hash Left Join (cost=36,602.25..104,719.88 rows=112,829 width=52) (actual time=136.100..191.289 rows=88,199 loops=1)

  • Hash Cond: (a.source = (b.id)::bpchar)
4. 10.266 33.700 ↑ 1.3 88,199 1

Nested Loop (cost=0.98..66,567.22 rows=112,829 width=33) (actual time=0.055..33.700 rows=88,199 loops=1)

5. 0.094 0.094 ↓ 2.6 389 1

Index Only Scan using securities_listconstituent_shareclass_id_list_id on securities_listconstituent c (cost=0.42..33.64 rows=152 width=25) (actual time=0.022..0.094 rows=389 loops=1)

  • Index Cond: (list_id = '6e87ce34-29ea-42da-8297-e6dd7e4967f8'::uuid)
  • Heap Fetches: 0
6. 23.340 23.340 ↑ 3.3 227 389

Index Scan using edgeflows_sink_enddate_idx on edgeflows a (cost=0.56..430.27 rows=745 width=26) (actual time=0.017..0.060 rows=227 loops=389)

  • Index Cond: ((sink = (c.shareclass_id)::bpchar) AND (enddate >= '2018-05-01'::date) AND (enddate <= '2019-05-01'::date))
7. 54.275 134.169 ↑ 1.8 182,182 1

Hash (cost=32,504.45..32,504.45 rows=327,745 width=37) (actual time=134.169..134.169 rows=182,182 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 16462kB
8. 79.894 79.894 ↑ 1.8 182,182 1

Seq Scan on securities_shareclass b (cost=0.00..32,504.45 rows=327,745 width=37) (actual time=0.086..79.894 rows=182,182 loops=1)

Planning time : 0.905 ms
Execution time : 216.605 ms