explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ojxj

Settings
# exclusive inclusive rows x rows loops node
1. 4,038.161 27,958.464 ↑ 1.0 45,349,266 1

Nested Loop (cost=343,300.17..1,864,132.58 rows=45,515,944 width=34) (actual time=4,217.291..27,958.464 rows=45,349,266 loops=1)

2. 16.124 4,273.749 ↑ 1.0 22,402 1

Hash Join (cost=343,299.60..344,588.85 rows=23,018 width=12) (actual time=4,216.505..4,273.749 rows=22,402 loops=1)

  • Hash Cond: (a.security_id = its_universe_component.m_security_id)
3. 17.354 41.186 ↑ 1.0 24,491 1

Merge Join (cost=0.57..1,225.52 rows=24,491 width=20) (actual time=0.029..41.186 rows=24,491 loops=1)

  • Merge Cond: (a.security_id = c.id)
4. 20.152 20.152 ↑ 1.0 24,491 1

Index Only Scan using i_quote_security_idx_id_covering on i_quote a (cost=0.29..483.54 rows=24,491 width=12) (actual time=0.015..20.152 rows=24,491 loops=1)

  • Filter: (primary_exchange = 1)
  • Heap Fetches: 21,537
5. 3.680 3.680 ↑ 1.0 24,495 1

Index Only Scan using m_security_pkey on m_security c (cost=0.29..374.61 rows=24,495 width=8) (actual time=0.011..3.680 rows=24,495 loops=1)

  • Heap Fetches: 0
6. 2.778 4,216.439 ↑ 1.0 22,410 1

Hash (cost=343,011.30..343,011.30 rows=23,018 width=8) (actual time=4,216.439..4,216.439 rows=22,410 loops=1)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,132kB
7. 2,546.722 4,213.661 ↑ 1.0 22,410 1

HashAggregate (cost=342,550.94..342,781.12 rows=23,018 width=8) (actual time=4,210.780..4,213.661 rows=22,410 loops=1)

  • Group Key: its_universe_component.m_security_id
8. 1,666.939 1,666.939 ↑ 1.0 15,636,110 1

Index Only Scan using its_universe_component_idx_universe_id_covering on its_universe_component (cost=0.44..301,552.12 rows=16,399,528 width=8) (actual time=0.014..1,666.939 rows=15,636,110 loops=1)

  • Index Cond: (m_universe_id = 179)
  • Heap Fetches: 0
9. 19,646.554 19,646.554 ↓ 1.0 2,024 22,402

Index Only Scan using sp_ts_price_idx_id_date_covering on sp_ts_price b (cost=0.57..46.22 rows=1,980 width=34) (actual time=0.137..0.877 rows=2,024 loops=22,402)

  • Index Cond: ((quote_id = a.id) AND (price_date >= '2010-01-01 00:00:00'::timestamp without time zone) AND (price_date <= '2020-01-01 00:00:00'::timestamp without time zone))
  • Heap Fetches: 0