explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JUAW

Settings
# exclusive inclusive rows x rows loops node
1. 0.065 40,204.347 ↑ 7.4 28 1

Sort (cost=3,504,604.48..3,504,605.00 rows=206 width=128) (actual time=40,204.346..40,204.347 rows=28 loops=1)

  • Sort Key: (sum(tmp2.pctos)) DESC, (COALESCE(tmp2.investor, 'Other Investor Types'::character varying)), (sum((sum(((trunc(hh."position", 6) / 26685495540.000004) * '100'::numeric))))) DESC, (CASE hh.cusip WHEN '023135BM7'::bpchar THEN '2024'::text WHEN '023135BJ4'::bpchar THEN '2024'::text WHEN '023135BF2'::bpchar THEN '2024'::text WHEN '023135BC9'::bpchar THEN '2024'::text WHEN '023135AZ9'::bpchar THEN '2024'::text WHEN '023135AW6'::bpchar THEN '2023'::text WHEN '023135AT3'::bpchar THEN '2020'::text WHEN '023135BN5'::bpchar THEN '2024'::text WHEN 'U02320AK2'::bpchar THEN '2024'::text WHEN 'U02320AJ5'::bpchar THEN '2024'::text WHEN 'U02320AH9'::bpchar THEN '2024'::text WHEN 'U02320AG1'::bpchar THEN '2024'::text WHEN 'U02320AF3'::bpchar THEN '2024'::text WHEN 'U02320AE6'::bpchar THEN '2023'::text WHEN 'U02320AD8'::bpchar THEN '2020'::text WHEN '023135BL9'::bpchar THEN '2024'::text WHEN '023135BK1'::bpchar THEN '2024'::text WHEN '023135BH8'::bpchar THEN '2024'::text WHEN '023135BG0'::bpchar THEN '2024'::text WHEN '023135BE5'::bpchar THEN '2024'::text WHEN '023135BD7'::bpchar THEN '2024'::text WHEN '023135BB1'::bpchar THEN '2024'::text WHEN '023135BA3'::bpchar THEN '2024'::text WHEN '023135AY2'::bpchar THEN '2024'::text WHEN '023135AX4'::bpchar THEN '2024'::text WHEN '023135AV8'::bpchar THEN '2023'::text WHEN '023135AU0'::bpchar THEN '2023'::text WHEN '023135AS5'::bpchar THEN '2020'::text WHEN '023135AR7'::bpchar THEN '2020'::text WHEN '966837AE6'::bpchar THEN '2024'::text WHEN 'U96710AA3'::bpchar THEN '2024'::text WHEN '966837AD8'::bpchar THEN '2024'::text WHEN '023135AQ9'::bpchar THEN '2024'::text WHEN '023135AP1'::bpchar THEN '2024'::text WHEN '023135AN6'::bpchar THEN '2024'::text WHEN '023135AM8'::bpchar THEN '2021'::text WHEN '023135AL0'::bpchar THEN '2019'::text WHEN '023135AJ5'::bpchar THEN '2022'::text WHEN '023135AH9'::bpchar THEN '2017'::text WHEN '023135AG1'::bpchar THEN '2010'::text WHEN 'FDS0U6IA9'::bpchar THEN '2021'::text WHEN 'FDS0O2PP4'::bpchar THEN '2018'::text WHEN 'FDS0LXH52'::bpchar THEN '2019'::text WHEN 'FDS0F9JT8'::bpchar THEN '2020'::text WHEN 'FDS095W76'::bpchar THEN '2016'::text WHEN 'FDSD87D01'::bpchar THEN '2012'::text WHEN 'FDS8E8841'::bpchar THEN '2012'::text WHEN 'FDS8E84C7'::bpchar THEN '2009'::text WHEN 'FDS46A927'::bpchar THEN '2010'::text WHEN 'FDS0FUQ89'::bpchar THEN '2002'::text WHEN 'FDS0FUQ97'::bpchar THEN 'Unavailable'::text ELSE NULL::text END)
  • Sort Method: quicksort Memory: 28kB
2. 0.039 40,204.282 ↑ 7.4 28 1

GroupAggregate (cost=3,504,590.90..3,504,596.56 rows=206 width=128) (actual time=40,204.252..40,204.282 rows=28 loops=1)

  • Group Key: (COALESCE(tmp2.investor, 'Other Investor Types'::character varying)), (CASE hh.cusip WHEN '023135BM7'::bpchar THEN '2024'::text WHEN '023135BJ4'::bpchar THEN '2024'::text WHEN '023135BF2'::bpchar THEN '2024'::text WHEN '023135BC9'::bpchar THEN '2024'::text WHEN '023135AZ9'::bpchar THEN '2024'::text WHEN '023135AW6'::bpchar THEN '2023'::text WHEN '023135AT3'::bpchar THEN '2020'::text WHEN '023135BN5'::bpchar THEN '2024'::text WHEN 'U02320AK2'::bpchar THEN '2024'::text WHEN 'U02320AJ5'::bpchar THEN '2024'::text WHEN 'U02320AH9'::bpchar THEN '2024'::text WHEN 'U02320AG1'::bpchar THEN '2024'::text WHEN 'U02320AF3'::bpchar THEN '2024'::text WHEN 'U02320AE6'::bpchar THEN '2023'::text WHEN 'U02320AD8'::bpchar THEN '2020'::text WHEN '023135BL9'::bpchar THEN '2024'::text WHEN '023135BK1'::bpchar THEN '2024'::text WHEN '023135BH8'::bpchar THEN '2024'::text WHEN '023135BG0'::bpchar THEN '2024'::text WHEN '023135BE5'::bpchar THEN '2024'::text WHEN '023135BD7'::bpchar THEN '2024'::text WHEN '023135BB1'::bpchar THEN '2024'::text WHEN '023135BA3'::bpchar THEN '2024'::text WHEN '023135AY2'::bpchar THEN '2024'::text WHEN '023135AX4'::bpchar THEN '2024'::text WHEN '023135AV8'::bpchar THEN '2023'::text WHEN '023135AU0'::bpchar THEN '2023'::text WHEN '023135AS5'::bpchar THEN '2020'::text WHEN '023135AR7'::bpchar THEN '2020'::text WHEN '966837AE6'::bpchar THEN '2024'::text WHEN 'U96710AA3'::bpchar THEN '2024'::text WHEN '966837AD8'::bpchar THEN '2024'::text WHEN '023135AQ9'::bpchar THEN '2024'::text WHEN '023135AP1'::bpchar THEN '2024'::text WHEN '023135AN6'::bpchar THEN '2024'::text WHEN '023135AM8'::bpchar THEN '2021'::text WHEN '023135AL0'::bpchar THEN '2019'::text WHEN '023135AJ5'::bpchar THEN '2022'::text WHEN '023135AH9'::bpchar THEN '2017'::text WHEN '023135AG1'::bpchar THEN '2010'::text WHEN 'FDS0U6IA9'::bpchar THEN '2021'::text WHEN 'FDS0O2PP4'::bpchar THEN '2018'::text WHEN 'FDS0LXH52'::bpchar THEN '2019'::text WHEN 'FDS0F9JT8'::bpchar THEN '2020'::text WHEN 'FDS095W76'::bpchar THEN '2016'::text WHEN 'FDSD87D01'::bpchar THEN '2012'::text WHEN 'FDS8E8841'::bpchar THEN '2012'::text WHEN 'FDS8E84C7'::bpchar THEN '2009'::text WHEN 'FDS46A927'::bpchar THEN '2010'::text WHEN 'FDS0FUQ89'::bpchar THEN '2002'::text WHEN 'FDS0FUQ97'::bpchar THEN 'Unavailable'::text ELSE NULL::text END)
3. 0.046 40,204.243 ↑ 6.1 34 1

Sort (cost=3,504,590.90..3,504,591.41 rows=206 width=128) (actual time=40,204.242..40,204.243 rows=34 loops=1)

  • Sort Key: (COALESCE(tmp2.investor, 'Other Investor Types'::character varying)), (CASE hh.cusip WHEN '023135BM7'::bpchar THEN '2024'::text WHEN '023135BJ4'::bpchar THEN '2024'::text WHEN '023135BF2'::bpchar THEN '2024'::text WHEN '023135BC9'::bpchar THEN '2024'::text WHEN '023135AZ9'::bpchar THEN '2024'::text WHEN '023135AW6'::bpchar THEN '2023'::text WHEN '023135AT3'::bpchar THEN '2020'::text WHEN '023135BN5'::bpchar THEN '2024'::text WHEN 'U02320AK2'::bpchar THEN '2024'::text WHEN 'U02320AJ5'::bpchar THEN '2024'::text WHEN 'U02320AH9'::bpchar THEN '2024'::text WHEN 'U02320AG1'::bpchar THEN '2024'::text WHEN 'U02320AF3'::bpchar THEN '2024'::text WHEN 'U02320AE6'::bpchar THEN '2023'::text WHEN 'U02320AD8'::bpchar THEN '2020'::text WHEN '023135BL9'::bpchar THEN '2024'::text WHEN '023135BK1'::bpchar THEN '2024'::text WHEN '023135BH8'::bpchar THEN '2024'::text WHEN '023135BG0'::bpchar THEN '2024'::text WHEN '023135BE5'::bpchar THEN '2024'::text WHEN '023135BD7'::bpchar THEN '2024'::text WHEN '023135BB1'::bpchar THEN '2024'::text WHEN '023135BA3'::bpchar THEN '2024'::text WHEN '023135AY2'::bpchar THEN '2024'::text WHEN '023135AX4'::bpchar THEN '2024'::text WHEN '023135AV8'::bpchar THEN '2023'::text WHEN '023135AU0'::bpchar THEN '2023'::text WHEN '023135AS5'::bpchar THEN '2020'::text WHEN '023135AR7'::bpchar THEN '2020'::text WHEN '966837AE6'::bpchar THEN '2024'::text WHEN 'U96710AA3'::bpchar THEN '2024'::text WHEN '966837AD8'::bpchar THEN '2024'::text WHEN '023135AQ9'::bpchar THEN '2024'::text WHEN '023135AP1'::bpchar THEN '2024'::text WHEN '023135AN6'::bpchar THEN '2024'::text WHEN '023135AM8'::bpchar THEN '2021'::text WHEN '023135AL0'::bpchar THEN '2019'::text WHEN '023135AJ5'::bpchar THEN '2022'::text WHEN '023135AH9'::bpchar THEN '2017'::text WHEN '023135AG1'::bpchar THEN '2010'::text WHEN 'FDS0U6IA9'::bpchar THEN '2021'::text WHEN 'FDS0O2PP4'::bpchar THEN '2018'::text WHEN 'FDS0LXH52'::bpchar THEN '2019'::text WHEN 'FDS0F9JT8'::bpchar THEN '2020'::text WHEN 'FDS095W76'::bpchar THEN '2016'::text WHEN 'FDSD87D01'::bpchar THEN '2012'::text WHEN 'FDS8E8841'::bpchar THEN '2012'::text WHEN 'FDS8E84C7'::bpchar THEN '2009'::text WHEN 'FDS46A927'::bpchar THEN '2010'::text WHEN 'FDS0FUQ89'::bpchar THEN '2002'::text WHEN 'FDS0FUQ97'::bpchar THEN 'Unavailable'::text ELSE NULL::text END)
  • Sort Method: quicksort Memory: 29kB
4. 0.015 40,204.197 ↑ 6.1 34 1

Merge Left Join (cost=3,504,547.65..3,504,582.98 rows=206 width=128) (actual time=40,203.331..40,204.197 rows=34 loops=1)

  • Merge Cond: ((pu.investor)::text = (tmp2.investor)::text)
5. 0.817 34,957.491 ↑ 6.1 34 1

GroupAggregate (cost=1,752,283.04..1,752,315.48 rows=206 width=76) (actual time=34,956.635..34,957.491 rows=34 loops=1)

  • Group Key: pu.investor, (CASE hh.cusip WHEN '023135BM7'::bpchar THEN '2024'::text WHEN '023135BJ4'::bpchar THEN '2024'::text WHEN '023135BF2'::bpchar THEN '2024'::text WHEN '023135BC9'::bpchar THEN '2024'::text WHEN '023135AZ9'::bpchar THEN '2024'::text WHEN '023135AW6'::bpchar THEN '2023'::text WHEN '023135AT3'::bpchar THEN '2020'::text WHEN '023135BN5'::bpchar THEN '2024'::text WHEN 'U02320AK2'::bpchar THEN '2024'::text WHEN 'U02320AJ5'::bpchar THEN '2024'::text WHEN 'U02320AH9'::bpchar THEN '2024'::text WHEN 'U02320AG1'::bpchar THEN '2024'::text WHEN 'U02320AF3'::bpchar THEN '2024'::text WHEN 'U02320AE6'::bpchar THEN '2023'::text WHEN 'U02320AD8'::bpchar THEN '2020'::text WHEN '023135BL9'::bpchar THEN '2024'::text WHEN '023135BK1'::bpchar THEN '2024'::text WHEN '023135BH8'::bpchar THEN '2024'::text WHEN '023135BG0'::bpchar THEN '2024'::text WHEN '023135BE5'::bpchar THEN '2024'::text WHEN '023135BD7'::bpchar THEN '2024'::text WHEN '023135BB1'::bpchar THEN '2024'::text WHEN '023135BA3'::bpchar THEN '2024'::text WHEN '023135AY2'::bpchar THEN '2024'::text WHEN '023135AX4'::bpchar THEN '2024'::text WHEN '023135AV8'::bpchar THEN '2023'::text WHEN '023135AU0'::bpchar THEN '2023'::text WHEN '023135AS5'::bpchar THEN '2020'::text WHEN '023135AR7'::bpchar THEN '2020'::text WHEN '966837AE6'::bpchar THEN '2024'::text WHEN 'U96710AA3'::bpchar THEN '2024'::text WHEN '966837AD8'::bpchar THEN '2024'::text WHEN '023135AQ9'::bpchar THEN '2024'::text WHEN '023135AP1'::bpchar THEN '2024'::text WHEN '023135AN6'::bpchar THEN '2024'::text WHEN '023135AM8'::bpchar THEN '2021'::text WHEN '023135AL0'::bpchar THEN '2019'::text WHEN '023135AJ5'::bpchar THEN '2022'::text WHEN '023135AH9'::bpchar THEN '2017'::text WHEN '023135AG1'::bpchar THEN '2010'::text WHEN 'FDS0U6IA9'::bpchar THEN '2021'::text WHEN 'FDS0O2PP4'::bpchar THEN '2018'::text WHEN 'FDS0LXH52'::bpchar THEN '2019'::text WHEN 'FDS0F9JT8'::bpchar THEN '2020'::text WHEN 'FDS095W76'::bpchar THEN '2016'::text WHEN 'FDSD87D01'::bpchar THEN '2012'::text WHEN 'FDS8E8841'::bpchar THEN '2012'::text WHEN 'FDS8E84C7'::bpchar THEN '2009'::text WHEN 'FDS46A927'::bpchar THEN '2010'::text WHEN 'FDS0FUQ89'::bpchar THEN '2002'::text WHEN 'FDS0FUQ97'::bpchar THEN 'Unavailable'::text ELSE NULL::text END)
6. 0.757 34,956.674 ↓ 4.1 842 1

Sort (cost=1,752,283.04..1,752,283.55 rows=206 width=76) (actual time=34,956.619..34,956.674 rows=842 loops=1)

  • Sort Key: pu.investor, (CASE hh.cusip WHEN '023135BM7'::bpchar THEN '2024'::text WHEN '023135BJ4'::bpchar THEN '2024'::text WHEN '023135BF2'::bpchar THEN '2024'::text WHEN '023135BC9'::bpchar THEN '2024'::text WHEN '023135AZ9'::bpchar THEN '2024'::text WHEN '023135AW6'::bpchar THEN '2023'::text WHEN '023135AT3'::bpchar THEN '2020'::text WHEN '023135BN5'::bpchar THEN '2024'::text WHEN 'U02320AK2'::bpchar THEN '2024'::text WHEN 'U02320AJ5'::bpchar THEN '2024'::text WHEN 'U02320AH9'::bpchar THEN '2024'::text WHEN 'U02320AG1'::bpchar THEN '2024'::text WHEN 'U02320AF3'::bpchar THEN '2024'::text WHEN 'U02320AE6'::bpchar THEN '2023'::text WHEN 'U02320AD8'::bpchar THEN '2020'::text WHEN '023135BL9'::bpchar THEN '2024'::text WHEN '023135BK1'::bpchar THEN '2024'::text WHEN '023135BH8'::bpchar THEN '2024'::text WHEN '023135BG0'::bpchar THEN '2024'::text WHEN '023135BE5'::bpchar THEN '2024'::text WHEN '023135BD7'::bpchar THEN '2024'::text WHEN '023135BB1'::bpchar THEN '2024'::text WHEN '023135BA3'::bpchar THEN '2024'::text WHEN '023135AY2'::bpchar THEN '2024'::text WHEN '023135AX4'::bpchar THEN '2024'::text WHEN '023135AV8'::bpchar THEN '2023'::text WHEN '023135AU0'::bpchar THEN '2023'::text WHEN '023135AS5'::bpchar THEN '2020'::text WHEN '023135AR7'::bpchar THEN '2020'::text WHEN '966837AE6'::bpchar THEN '2024'::text WHEN 'U96710AA3'::bpchar THEN '2024'::text WHEN '966837AD8'::bpchar THEN '2024'::text WHEN '023135AQ9'::bpchar THEN '2024'::text WHEN '023135AP1'::bpchar THEN '2024'::text WHEN '023135AN6'::bpchar THEN '2024'::text WHEN '023135AM8'::bpchar THEN '2021'::text WHEN '023135AL0'::bpchar THEN '2019'::text WHEN '023135AJ5'::bpchar THEN '2022'::text WHEN '023135AH9'::bpchar THEN '2017'::text WHEN '023135AG1'::bpchar THEN '2010'::text WHEN 'FDS0U6IA9'::bpchar THEN '2021'::text WHEN 'FDS0O2PP4'::bpchar THEN '2018'::text WHEN 'FDS0LXH52'::bpchar THEN '2019'::text WHEN 'FDS0F9JT8'::bpchar THEN '2020'::text WHEN 'FDS095W76'::bpchar THEN '2016'::text WHEN 'FDSD87D01'::bpchar THEN '2012'::text WHEN 'FDS8E8841'::bpchar THEN '2012'::text WHEN 'FDS8E84C7'::bpchar THEN '2009'::text WHEN 'FDS46A927'::bpchar THEN '2010'::text WHEN 'FDS0FUQ89'::bpchar THEN '2002'::text WHEN 'FDS0FUQ97'::bpchar THEN 'Unavailable'::text ELSE NULL::text END)
  • Sort Method: quicksort Memory: 90kB
7. 1.297 34,955.917 ↓ 4.1 842 1

Nested Loop (cost=1,697,501.46..1,752,275.12 rows=206 width=76) (actual time=34,221.056..34,955.917 rows=842 loops=1)

8. 1.552 34,217.028 ↑ 8.3 842 1

HashAggregate (cost=1,697,501.03..1,697,570.93 rows=6,990 width=88) (actual time=34,216.633..34,217.028 rows=842 loops=1)

  • Group Key: hh.company_number, hh.cusip, hh."position
9. 0.211 34,215.476 ↑ 8.3 842 1

Append (cost=1,636.04..1,697,448.60 rows=6,990 width=88) (actual time=10,599.191..34,215.476 rows=842 loops=1)

10. 987.685 33,309.673 ↓ 9.0 9 1

Hash Join (cost=1,636.04..1,669,112.57 rows=1 width=22) (actual time=10,599.190..33,309.673 rows=9 loops=1)

  • Hash Cond: ((s.cusip)::bpchar = hh.cusip)
11. 4,046.460 32,260.920 ↓ 169.8 9,202,101 1

Gather (cost=1,000.00..1,661,568.32 rows=54,182 width=10) (actual time=29.282..32,260.920 rows=9,202,101 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
12. 28,214.460 28,214.460 ↓ 135.9 3,067,367 3

Parallel Seq Scan on own_secmas s (cost=0.00..1,655,150.12 rows=22,576 width=10) (actual time=17.380..28,214.460 rows=3,067,367 loops=3)

  • Filter: (lower((fi_flag)::text) = 'true'::text)
  • Rows Removed by Filter: 544746
13. 0.023 61.068 ↑ 11.1 9 1

Hash (cost=634.79..634.79 rows=100 width=22) (actual time=61.068..61.068 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 61.045 61.045 ↑ 11.1 9 1

Index Scan using "IX_own_schedule_d_hist_snapshot_ix_own_schedule_d_hist_snapshot" on own_schedule_d_hist_snapshot hh (cost=0.56..634.79 rows=100 width=22) (actual time=9.270..61.045 rows=9 loops=1)

  • Index Cond: ((cusip = ANY ('{023135BM7,023135BJ4,023135BF2,023135BC9,023135AZ9,023135AW6,023135AT3,023135BN5,U02320AK2,U02320AJ5,U02320AH9,U02320AG1,U02320AF3,U02320AE6,U02320AD8,023135BL9,023135BK1,023135BH8,023135BG0,023135BE5,023135BD7,023135BB1,023135BA3,023135AY2,023135AX4,023135AV8,023135AU0,023135AS5,023135AR7,966837AE6,U96710AA3,966837AD8,023135AQ9,023135AP1,023135AN6,023135AM8,023135AL0,023135AJ5,023135AH9,023135AG1,FDS0U6IA9,FDS0O2PP4,FDS0LXH52,FDS0F9JT8,FDS095W76,FDSD87D01,FDS8E8841,FDS8E84C7,FDS46A927,FDS0FUQ89,FDS0FUQ97}'::bpchar[])) AND (report_date = '2019-03-31'::date))
15. 905.592 905.592 ↑ 8.4 833 1

Index Scan using "IX_own_snapshot_ix_own_snapshot_cusip" on own_snapshot hh_1 (cost=0.57..28,266.13 rows=6,989 width=48) (actual time=8.555..905.592 rows=833 loops=1)

  • Index Cond: ((cusip = ANY ('{023135BM7,023135BJ4,023135BF2,023135BC9,023135AZ9,023135AW6,023135AT3,023135BN5,U02320AK2,U02320AJ5,U02320AH9,U02320AG1,U02320AF3,U02320AE6,U02320AD8,023135BL9,023135BK1,023135BH8,023135BG0,023135BE5,023135BD7,023135BB1,023135BA3,023135AY2,023135AX4,023135AV8,023135AU0,023135AS5,023135AR7,966837AE6,U96710AA3,966837AD8,023135AQ9,023135AP1,023135AN6,023135AM8,023135AL0,023135AJ5,023135AH9,023135AG1,FDS0U6IA9,FDS0O2PP4,FDS0LXH52,FDS0F9JT8,FDS095W76,FDSD87D01,FDS8E8841,FDS8E84C7,FDS46A927,FDS0FUQ89,FDS0FUQ97}'::bpchar[])) AND (report_date = '2019-03-31'::date))
16. 737.592 737.592 ↑ 1.0 1 842

Index Scan using pk_own_portmas_ultimate_1648776981 on own_portmas_ultimate pu (cost=0.43..7.81 rows=1 width=18) (actual time=0.876..0.876 rows=1 loops=842)

  • Index Cond: ((company_number = hh.company_number) AND (portfolio_type = 'F'::bpchar))
17. 0.019 5,246.691 ↑ 5.0 4 1

Sort (cost=1,752,264.62..1,752,264.67 rows=20 width=44) (actual time=5,246.690..5,246.691 rows=4 loops=1)

  • Sort Key: tmp2.investor
  • Sort Method: quicksort Memory: 25kB
18. 0.003 5,246.672 ↑ 5.0 4 1

Subquery Scan on tmp2 (cost=1,752,262.38..1,752,264.18 rows=20 width=44) (actual time=5,246.667..5,246.672 rows=4 loops=1)

  • Filter: (tmp2.rnk <= 4)
  • Rows Removed by Filter: 3
19. 0.009 5,246.669 ↑ 8.6 7 1

WindowAgg (cost=1,752,262.38..1,752,263.43 rows=60 width=52) (actual time=5,246.666..5,246.669 rows=7 loops=1)

20. 0.014 5,246.660 ↑ 8.6 7 1

Sort (cost=1,752,262.38..1,752,262.53 rows=60 width=44) (actual time=5,246.660..5,246.660 rows=7 loops=1)

  • Sort Key: (sum(((trunc(hh_2."position", 6) / 26685495540.000004) * '100'::numeric))) DESC
  • Sort Method: quicksort Memory: 25kB
21. 0.747 5,246.646 ↑ 8.6 7 1

GroupAggregate (cost=1,752,256.77..1,752,260.61 rows=60 width=44) (actual time=5,245.876..5,246.646 rows=7 loops=1)

  • Group Key: pu_1.investor
22. 0.285 5,245.899 ↓ 4.1 842 1

Sort (cost=1,752,256.77..1,752,257.29 rows=206 width=44) (actual time=5,245.861..5,245.899 rows=842 loops=1)

  • Sort Key: pu_1.investor
  • Sort Method: quicksort Memory: 90kB
23. 0.586 5,245.614 ↓ 4.1 842 1

Nested Loop (cost=1,697,501.46..1,752,248.85 rows=206 width=44) (actual time=5,242.343..5,245.614 rows=842 loops=1)

24. 0.577 5,242.502 ↑ 8.3 842 1

HashAggregate (cost=1,697,501.03..1,697,570.93 rows=6,990 width=88) (actual time=5,242.323..5,242.502 rows=842 loops=1)

  • Group Key: hh_2.company_number, hh_2.cusip, hh_2."position
25. 0.069 5,241.925 ↑ 8.3 842 1

Append (cost=1,636.04..1,697,448.60 rows=6,990 width=88) (actual time=199.310..5,241.925 rows=842 loops=1)

26. 722.205 5,239.980 ↓ 9.0 9 1

Hash Join (cost=1,636.04..1,669,112.57 rows=1 width=22) (actual time=199.309..5,239.980 rows=9 loops=1)

  • Hash Cond: ((s_1.cusip)::bpchar = hh_2.cusip)
27. 1,356.669 4,517.196 ↓ 169.8 9,202,101 1

Gather (cost=1,000.00..1,661,568.32 rows=54,182 width=10) (actual time=0.564..4,517.196 rows=9,202,101 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
28. 3,160.527 3,160.527 ↓ 135.9 3,067,367 3

Parallel Seq Scan on own_secmas s_1 (cost=0.00..1,655,150.12 rows=22,576 width=10) (actual time=0.421..3,160.527 rows=3,067,367 loops=3)

  • Filter: (lower((fi_flag)::text) = 'true'::text)
  • Rows Removed by Filter: 544746
29. 0.007 0.579 ↑ 11.1 9 1

Hash (cost=634.79..634.79 rows=100 width=22) (actual time=0.579..0.579 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.572 0.572 ↑ 11.1 9 1

Index Scan using "IX_own_schedule_d_hist_snapshot_ix_own_schedule_d_hist_snapshot" on own_schedule_d_hist_snapshot hh_2 (cost=0.56..634.79 rows=100 width=22) (actual time=0.153..0.572 rows=9 loops=1)

  • Index Cond: ((cusip = ANY ('{023135BM7,023135BJ4,023135BF2,023135BC9,023135AZ9,023135AW6,023135AT3,023135BN5,U02320AK2,U02320AJ5,U02320AH9,U02320AG1,U02320AF3,U02320AE6,U02320AD8,023135BL9,023135BK1,023135BH8,023135BG0,023135BE5,023135BD7,023135BB1,023135BA3,023135AY2,023135AX4,023135AV8,023135AU0,023135AS5,023135AR7,966837AE6,U96710AA3,966837AD8,023135AQ9,023135AP1,023135AN6,023135AM8,023135AL0,023135AJ5,023135AH9,023135AG1,FDS0U6IA9,FDS0O2PP4,FDS0LXH52,FDS0F9JT8,FDS095W76,FDSD87D01,FDS8E8841,FDS8E84C7,FDS46A927,FDS0FUQ89,FDS0FUQ97}'::bpchar[])) AND (report_date = '2019-03-31'::date))
31. 1.876 1.876 ↑ 8.4 833 1

Index Scan using "IX_own_snapshot_ix_own_snapshot_cusip" on own_snapshot hh_3 (cost=0.57..28,266.13 rows=6,989 width=48) (actual time=0.203..1.876 rows=833 loops=1)

  • Index Cond: ((cusip = ANY ('{023135BM7,023135BJ4,023135BF2,023135BC9,023135AZ9,023135AW6,023135AT3,023135BN5,U02320AK2,U02320AJ5,U02320AH9,U02320AG1,U02320AF3,U02320AE6,U02320AD8,023135BL9,023135BK1,023135BH8,023135BG0,023135BE5,023135BD7,023135BB1,023135BA3,023135AY2,023135AX4,023135AV8,023135AU0,023135AS5,023135AR7,966837AE6,U96710AA3,966837AD8,023135AQ9,023135AP1,023135AN6,023135AM8,023135AL0,023135AJ5,023135AH9,023135AG1,FDS0U6IA9,FDS0O2PP4,FDS0LXH52,FDS0F9JT8,FDS095W76,FDSD87D01,FDS8E8841,FDS8E84C7,FDS46A927,FDS0FUQ89,FDS0FUQ97}'::bpchar[])) AND (report_date = '2019-03-31'::date))
32. 2.526 2.526 ↑ 1.0 1 842

Index Scan using pk_own_portmas_ultimate_1648776981 on own_portmas_ultimate pu_1 (cost=0.43..7.81 rows=1 width=18) (actual time=0.003..0.003 rows=1 loops=842)

  • Index Cond: ((company_number = hh_2.company_number) AND (portfolio_type = 'F'::bpchar))