explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YZlN : New Line 19-41

Settings
# exclusive inclusive rows x rows loops node
1. 1.654 7.554 ↓ 4.1 842 1

Nested Loop (cost=28,809.30..83,588.98 rows=206 width=76) (actual time=3.223..7.554 rows=842 loops=1)

2. 0.468 3.374 ↑ 8.3 842 1

HashAggregate (cost=28,808.87..28,878.78 rows=6,991 width=88) (actual time=3.204..3.374 rows=842 loops=1)

  • Group Key: hh.company_number, hh.cusip, hh."position
3.          

CTE secmas_cusips

4. 0.595 0.595 ↓ 43.0 43 1

Index Scan using pk_own_secmas_1442104178 on own_secmas (cost=0.56..407.74 rows=1 width=10) (actual time=0.148..0.595 rows=43 loops=1)

  • Index Cond: ((cusip)::text = 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}'::text[]))
  • Filter: (lower((fi_flag)::text) = 'true'::text)
  • Rows Removed by Filter: 1
5. 0.066 2.906 ↑ 8.3 842 1

Append (cost=0.59..28,348.70 rows=6,991 width=88) (actual time=0.665..2.906 rows=842 loops=1)

6. 0.000 1.022 ↓ 4.5 9 1

Nested Loop (cost=0.59..12.66 rows=2 width=22) (actual time=0.665..1.022 rows=9 loops=1)

7. 0.024 0.637 ↓ 43.0 43 1

HashAggregate (cost=0.02..0.03 rows=1 width=36) (actual time=0.632..0.637 rows=43 loops=1)

  • Group Key: (secmas_cusips.cusip)::bpchar
8. 0.613 0.613 ↓ 43.0 43 1

CTE Scan on secmas_cusips (cost=0.00..0.02 rows=1 width=36) (actual time=0.150..0.613 rows=43 loops=1)

9. 0.387 0.387 ↓ 0.0 0 43

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..12.60 rows=2 width=22) (actual time=0.009..0.009 rows=0 loops=43)

  • Index Cond: ((cusip = (secmas_cusips.cusip)::bpchar) AND (report_date = '2019-03-31'::date))
10. 1.818 1.818 ↑ 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.150..1.818 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))
11. 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.083 ms
Execution time : 7.919 ms