explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LqTu

Settings
# exclusive inclusive rows x rows loops node
1. 135.348 15,269.972 ↓ 2.6 525 1

Index Scan using t_normalized_data_monthly_date_local_valuation_date_asset_i_key on t_normalized_data_monthly ndm (cost=0.42..5,517,516.33 rows=202 width=194) (actual time=29.482..15,269.972 rows=525 loops=1)

  • Index Cond: ((ndm.date_local >= '2020-01-01'::date) AND (ndm.date_local <= '2020-09-30'::date) AND (ndm.asset_id = ANY ('{10102,10103,10104,10105,10106,10107,10108,10109,10110,10111,10112,10113,10114,10115,10116,10117,10118,10119,10120}'::bigint[])))
  • Filter: (ndm.valuation_date = (SubPlan 1))
  • Buffers: shared hit=6,074,823
2.          

SubPlan (for Index Scan)

3. 659.940 15,134.624 ↑ 1.0 1 43,996

Aggregate (cost=135.96..135.97 rows=1 width=4) (actual time=0.344..0.344 rows=1 loops=43,996)

  • Buffers: shared hit=6,028,220
4. 14,474.684 14,474.684 ↓ 163.0 163 43,996

Index Only Scan using t_normalized_data_monthly_date_local_valuation_date_asset_i_key on t_normalized_data_monthly ndm2 (cost=0.42..135.96 rows=1 width=4) (actual time=0.045..0.329 rows=163 loops=43,996)

  • Index Cond: ((ndm2.date_local = ndm.date_local) AND (ndm2.valuation_date <= '2020-09-09'::date) AND (ndm2.asset_id = ndm.asset_id) AND (ndm2.target_data_level_id = ndm.target_data_level_id) AND (ndm2.data_level_id = ndm.data_level_id))
  • Heap Fetches: 2,450,646
  • Buffers: shared hit=6,028,220
Planning time : 0.326 ms
Execution time : 15,270.252 ms