explain.depesz.com

PostgreSQL's explain analyze made readable

Result: OSM8

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 459.017 ↑ 1.0 1 1

GroupAggregate (cost=82,698.48..82,698.56 rows=1 width=100) (actual time=459.016..459.017 rows=1 loops=1)

  • Output: (((max(eq_closing_price_dtls.closing_price))::text || '!'::text) || (eq_closing_price_dtls.sec_ccy_code)::text), (((min(eq_closing_price_dtls.closing_price))::text || '!'::text) || (eq_closing_price_dtls.sec_ccy_code)::text), (((round(avg(eq_closing_price_dtls.closing_price), 6))::text || '!'::text) || (eq_closing_price_dtls.sec_ccy_code)::text), eq_closing_price_dtls.sec_ccy_code
  • Group Key: eq_closing_price_dtls.sec_ccy_code
  • Buffers: shared hit=65162
2.          

Initplan (for GroupAggregate)

3. 0.701 458.935 ↑ 1.0 1 1

Aggregate (cost=82,693.83..82,693.86 rows=1 width=8) (actual time=458.935..458.935 rows=1 loops=1)

  • Output: max(eq_closing_price_dtls_1.price_date)
  • Buffers: shared hit=65156
4. 458.234 458.234 ↓ 5,035.0 5,035 1

Index Scan using idx_eq_closing_price_dtls_price_security on tbaadm.eq_closing_price_dtls eq_closing_price_dtls_1 (cost=0.56..82,693.83 rows=1 width=8) (actual time=28.271..458.234 rows=5,035 loops=1)

  • Output: eq_closing_price_dtls_1.bank_id, eq_closing_price_dtls_1.exchg_code, eq_closing_price_dtls_1.symbol, eq_closing_price_dtls_1.price_date, eq_closing_price_dtls_1.closing_price_flg, eq_closing_price_dtls_1.version_no, eq_closing_price_dtls_1.sec_ccy_code, eq_closing_price_dtls_1.external_code, eq_closing_price_dtls_1.price, eq_closing_price_dtls_1.prev_closing_price, eq_closing_price_dtls_1.change_in_price, eq_closing_price_dtls_1.pcnt_change, eq_closing_price_dtls_1.price_date_time, eq_closing_price_dtls_1.time_zone, eq_closing_price_dtls_1.closing_price, eq_closing_price_dtls_1.volume, eq_closing_price_dtls_1.day_open, eq_closing_price_dtls_1.day_high, eq_closing_price_dtls_1.day_low, eq_closing_price_dtls_1.bid_price, eq_closing_price_dtls_1.bid_qty, eq_closing_price_dtls_1.offer_price, eq_closing_price_dtls_1.offer_qty, eq_closing_price_dtls_1.fifty_two_week_high, eq_closing_price_dtls_1.high_date, eq_closing_price_dtls_1.fifty_two_week_low, eq_closing_price_dtls_1.low_date, eq_closing_price_dtls_1.remarks, eq_closing_price_dtls_1.security_code, eq_closing_price_dtls_1.entity_cre_flg, eq_closing_price_dtls_1.del_flg, eq_closing_price_dtls_1.lchg_user_id, eq_closing_price_dtls_1.lchg_time, eq_closing_price_dtls_1.rcre_user_id, eq_closing_price_dtls_1.rcre_time, eq_closing_price_dtls_1.ts_cnt, eq_closing_price_dtls_1.net_asset_value, eq_closing_price_dtls_1.market_capitalization, eq_closing_price_dtls_1.addnl_amt1, eq_closing_price_dtls_1.addnl_ccy1, eq_closing_price_dtls_1.addnl_amt2, eq_closing_price_dtls_1.addnl_ccy2, eq_closing_price_dtls_1.addnl_free_text1, eq_closing_price_dtls_1.addnl_free_text2, eq_closing_price_dtls_1.addnl_date1, eq_closing_price_dtls_1.addnl_date2, eq_closing_price_dtls_1.def_exchg_code1, eq_closing_price_dtls_1.def_exchg_code2, eq_closing_price_dtls_1.additional_text1, eq_closing_price_dtls_1.additional_text2, eq_closing_price_dtls_1.additional_char1, eq_closing_price_dtls_1.additional_char2
  • Index Cond: ((eq_closing_price_dtls_1.price_date <= to_date($7, 'DD-MM-YYYY HH24:MI:SS'::character varying)) AND ((eq_closing_price_dtls_1.security_code)::text = ($6)::text))
  • Filter: ((eq_closing_price_dtls_1.del_flg <> ($8)::bpchar) AND ((eq_closing_price_dtls_1.bank_id)::text = ($5)::text) AND (eq_closing_price_dtls_1.entity_cre_flg = ($9)::bpchar))
  • Buffers: shared hit=65156
5. 0.012 458.990 ↓ 2.0 2 1

Sort (cost=4.62..4.62 rows=1 width=10) (actual time=458.988..458.990 rows=2 loops=1)

  • Output: eq_closing_price_dtls.sec_ccy_code, eq_closing_price_dtls.closing_price
  • Sort Key: eq_closing_price_dtls.sec_ccy_code
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=65162
6. 458.978 458.978 ↓ 2.0 2 1

Index Scan using idx_eq_closing_price_dtls_price_security on tbaadm.eq_closing_price_dtls (cost=0.56..4.61 rows=1 width=10) (actual time=458.976..458.978 rows=2 loops=1)

  • Output: eq_closing_price_dtls.sec_ccy_code, eq_closing_price_dtls.closing_price
  • Index Cond: ((eq_closing_price_dtls.price_date = $1) AND ((eq_closing_price_dtls.security_code)::text = ($2)::text))
  • Filter: ((eq_closing_price_dtls.del_flg <> ($3)::bpchar) AND ((eq_closing_price_dtls.bank_id)::text = ($1)::text) AND (eq_closing_price_dtls.entity_cre_flg = ($4)::bpchar))
  • Buffers: shared hit=65162