explain.depesz.com

PostgreSQL's explain analyze made readable

Result: AwtA

Settings
# exclusive inclusive rows x rows loops node
1. 0.041 10,563.483 ↑ 7.4 28 1

Sort (cost=3,504,604.48..3,504,605.00 rows=206 width=128) (actual time=10,563.482..10,563.483 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 10,563.442 ↑ 7.4 28 1

GroupAggregate (cost=3,504,590.90..3,504,596.56 rows=206 width=128) (actual time=10,563.412..10,563.442 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 10,563.403 ↑ 6.1 34 1

Sort (cost=3,504,590.90..3,504,591.41 rows=206 width=128) (actual time=10,563.401..10,563.403 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.016 10,563.357 ↑ 6.1 34 1

Merge Left Join (cost=3,504,547.65..3,504,582.98 rows=206 width=128) (actual time=10,562.478..10,563.357 rows=34 loops=1)

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

GroupAggregate (cost=1,752,283.04..1,752,315.48 rows=206 width=76) (actual time=5,280.879..5,281.746 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.596 5,280.919 ↓ 4.1 842 1

Sort (cost=1,752,283.04..1,752,283.55 rows=206 width=76) (actual time=5,280.861..5,280.919 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.077 5,280.323 ↓ 4.1 842 1

Nested Loop (cost=1,697,501.46..1,752,275.12 rows=206 width=76) (actual time=5,276.554..5,280.323 rows=842 loops=1)

8. 0.609 5,276.720 ↑ 8.3 842 1

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

  • Group Key: hh.company_number, hh.cusip, hh."position
9. 0.065 5,276.111 ↑ 8.3 842 1

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

10. 729.006 5,274.193 ↓ 9.0 9 1

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

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

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

  • Workers Planned: 2
  • Workers Launched: 2
12. 3,133.013 3,133.013 ↓ 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=0.422..3,133.013 rows=3,067,367 loops=3)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.557 0.557 ↑ 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=0.152..0.557 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. 1.853 1.853 ↑ 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=0.204..1.853 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. 2.526 2.526 ↑ 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.003..0.003 rows=1 loops=842)

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

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

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

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

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

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

20. 0.013 5,281.565 ↑ 8.6 7 1

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

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

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

  • Group Key: pu_1.investor
22. 0.255 5,280.801 ↓ 4.1 842 1

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

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

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

24. 0.574 5,277.455 ↑ 8.3 842 1

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

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

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

26. 723.145 5,274.973 ↓ 9.0 9 1

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

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

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

  • Workers Planned: 2
  • Workers Launched: 2
28. 3,143.666 3,143.666 ↓ 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.423..3,143.666 rows=3,067,367 loops=3)

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

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
30. 0.548 0.548 ↑ 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.147..0.548 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.841 1.841 ↑ 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.207..1.841 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))
Planning time : 3.875 ms
Execution time : 10,564.221 ms