explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Suum : Line 19-41 Original

Settings
# exclusive inclusive rows x rows loops node
1. 1.621 5,322.362 ↓ 4.1 842 1

Nested Loop (cost=1,697,501.46..1,752,276.66 rows=206 width=76) (actual time=5,318.055..5,322.362 rows=842 loops=1)

2. 0.588 5,318.215 ↑ 8.3 842 1

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

  • Group Key: hh.company_number, hh.cusip, hh."position
3. 0.067 5,317.627 ↑ 8.3 842 1

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

4. 742.086 5,315.732 ↓ 9.0 9 1

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

  • Hash Cond: ((s.cusip)::bpchar = hh.cusip)
5. 1,414.234 4,573.056 ↓ 169.8 9,202,101 1

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

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

  • Filter: (lower((fi_flag)::text) = 'true'::text)
  • Rows Removed by Filter: 544746
7. 0.008 0.590 ↑ 11.1 9 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.582 0.582 ↑ 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.156..0.582 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))
9. 1.828 1.828 ↑ 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.193..1.828 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))
10. 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))
Planning time : 1.335 ms
Execution time : 5,322.866 ms