explain.depesz.com

PostgreSQL's explain analyze made readable

Result: aYw0

Settings
# exclusive inclusive rows x rows loops node
1. 0.615 7,350.547 ↓ 393.0 393 1

Merge Join (cost=3,559,905.16..3,560,221.57 rows=1 width=712) (actual time=7,327.918..7,350.547 rows=393 loops=1)

  • Merge Cond: ((ho.stock_holding_id = tx1.stock_holding_id) AND (ho.company_id = tx1.company_id))
2.          

Initplan (for Merge Join)

3. 0.002 0.011 ↑ 1.0 1 1

Limit (cost=2.10..2.10 rows=1 width=4) (actual time=0.010..0.011 rows=1 loops=1)

4. 0.004 0.009 ↑ 6.0 1 1

Sort (cost=2.10..2.11 rows=6 width=4) (actual time=0.009..0.009 rows=1 loops=1)

  • Sort Key: cii2.wef_date DESC
  • Sort Method: quicksort Memory: 25kB
5. 0.005 0.005 ↑ 6.0 1 1

Seq Scan on cost_inflation_index cii2 (cost=0.00..2.07 rows=6 width=4) (actual time=0.004..0.005 rows=1 loops=1)

  • Filter: (('2020-01-08'::date >= year_start_date) AND ('2020-01-08'::date <= year_end_date) AND (wef_date <= '2020-01-08'::date))
  • Rows Removed by Filter: 60
6. 0.326 20.543 ↓ 131.0 393 1

Sort (cost=352.71..352.71 rows=3 width=671) (actual time=20.478..20.543 rows=393 loops=1)

  • Sort Key: ho.stock_holding_id, co.company_id
  • Sort Method: quicksort Memory: 128kB
7. 0.155 20.217 ↓ 131.0 393 1

Nested Loop Left Join (cost=10.51..352.68 rows=3 width=671) (actual time=0.147..20.217 rows=393 loops=1)

  • Join Filter: (cr18.rate_date = pri18.as_of)
  • Rows Removed by Join Filter: 38
8. 0.272 20.062 ↓ 131.0 393 1

Nested Loop Left Join (cost=10.10..344.20 rows=3 width=670) (actual time=0.139..20.062 rows=393 loops=1)

9. 0.152 17.432 ↓ 131.0 393 1

Nested Loop Left Join (cost=9.54..319.57 rows=3 width=654) (actual time=0.131..17.432 rows=393 loops=1)

  • Join Filter: (cr.rate_date = pri.as_of)
  • Rows Removed by Join Filter: 36
10. 0.000 17.280 ↓ 131.0 393 1

Nested Loop Left Join (cost=9.12..311.08 rows=3 width=653) (actual time=0.119..17.280 rows=393 loops=1)

11. 0.308 16.511 ↓ 131.0 393 1

Nested Loop Left Join (cost=2.12..294.89 rows=3 width=645) (actual time=0.112..16.511 rows=393 loops=1)

12. 0.077 15.810 ↓ 131.0 393 1

Nested Loop (cost=1.84..281.97 rows=3 width=637) (actual time=0.106..15.810 rows=393 loops=1)

13. 0.028 13.768 ↓ 393.0 393 1

Nested Loop Left Join (cost=1.84..279.88 rows=1 width=632) (actual time=0.087..13.768 rows=393 loops=1)

14. 0.384 10.989 ↓ 393.0 393 1

Nested Loop (cost=1.28..271.66 rows=1 width=618) (actual time=0.073..10.989 rows=393 loops=1)

  • Join Filter: (ind.sector_code = sec.sector_code)
  • Rows Removed by Join Filter: 2,781
15. 1.811 10.212 ↓ 393.0 393 1

Nested Loop (cost=1.28..270.28 rows=1 width=110) (actual time=0.067..10.212 rows=393 loops=1)

  • Join Filter: (co.industry_code = ind.industry_code)
  • Rows Removed by Join Filter: 27,686
16. 0.137 6.436 ↓ 393.0 393 1

Nested Loop Left Join (cost=1.28..263.37 rows=1 width=94) (actual time=0.052..6.436 rows=393 loops=1)

17. 0.219 2.369 ↓ 393.0 393 1

Nested Loop (cost=0.72..244.85 rows=1 width=85) (actual time=0.026..2.369 rows=393 loops=1)

18. 0.971 0.971 ↓ 393.0 393 1

Index Scan using stock_holdings_user_id_fkey_idx on stock_holdings ho (cost=0.43..236.55 rows=1 width=16) (actual time=0.019..0.971 rows=393 loops=1)

  • Index Cond: (user_id = '445661'::bigint)
  • Filter: (stock_holding_id = ANY ('{15228762,15228763,15228764,15228765,15228766,15228767,15228768,15228769,15228770,15228771,15228772,15228773,15228774,15228775,15228776,15228777,15228778,15228779,15228780,15228781,15228782,15228783,15228784,15228785,15228786,15228787,15228788,15228789,15228790,15228791,15228792,15228793,15228794,15228795,15228796,15228797,15228798,15228799,15228800,15228801,15228802,15228803,15228804,15228805,15228806,15228807,15228808,15228809,15228810,15228811,15228812,15228813,15228814,15228815,15228816,15228817,15228818,15228819,15228820,15228821,15228822,15228823,15228824,15228825,15228826,15228827,15228828,15228829,15228830,15228831,15228832,15228833,15228834,15228835,15228836,15228837,15228838,15228839,15228840,15228841,15228842,15228843,15228844,15228845,15228846,15228847,15228848,15228849,15228850,15228851,15228852,15228853,15228854,15228855,15228856,15228857,15228858,15228859,15228860,15228861,15228862,15228863,15228864,15228865,15228878,15228884,15228885,15228886,15228888,15228889,15228890,15228891,15228894,15228896,15228897,15228899,15228900,15228902,15228903,15228904,15228905,15228906,15228907,15228908,15228909,15228911,15228912,15228913,15228914,15228915,15228916,15228917,15228918,15228924,15228926,15228935,15228936,15228937,15228938,15228939,15228940,15228941,15228942,15228943,15228944,15228945,15228946,15228947,15228948,15228949,15228950,15228951,15228952,15228953,15228954,15228955,15228956,15228957,15228958,15228959,15228960,15228961,15228962,15228963,15228964,15228965,15228966,15228967,15228968,15228969,15228970,15228971,15228972,15228973,15228974,15228975,15228976,15228977,15228978,15228979,15228980,15228981,15228982,15228983,15228984,15228985,15228986,15228987,15228988,15228989,15228990,15228991,15228992,15228993,15228994,15228995,15228996,15228997,15228998,15228999,15229000,15229001,15229002,15229003,15229004,15229005,15229006,15229007,15229008,15229009,15229010,15229011,15229012,15229013,15229014,15229015,15229016,15229017,15229018,15229019,15229020,15229021,15229022,15229023,15229024,15229025,15229026,15229027,15229028,15229029,15229030,15229031,15229032,15229033,15229034,15229035,15229036,15229037,15229038,15229039,15229040,15229041,15229042,15229043,15229044,15229045,15229046,15229047,15229048,15229049,15229050,15229051,15229052,15229053,15229054,15229055,15229056,15229057,15229058,15229059,15229060,15229061,15229062,15229063,15229064,15229065,15229066,15229067,15229068,15229069,15229070,15229071,15229072,15229073,15229074,15229075,15229076,15229077,15229078,15229079,15229080,15229081,15229082,15229083,15229084,15229085,15229086,15229087,15229088,15229089,15229090,15229091,15229092,15229093,15229094,15229095,15229096,15229097,15229098,15229099,15229100,15229101,15229102,15229103,15229104,15229105,15229106,15229107,15229108,15229109,15229110,15229111,15229112,15229113,15229114,15229115,15229116,15229117,15229118,15229119,15229120,15229121,15229122,15229123,15229124,15229125,15229126,15229127,15229128,15229137,15229138,15229139,15229140,15229141,15229147,15229149,15229152,15229154,15229155,15229157,15229158,15229161,15229162,15229163,15229164,15229165,15229166,15229167,15229208,15229215,15229225,15229226,15229228,15229233,15229237,15229244,15229247,15229248,15229249,15229256,15229272,15229273,15229274,15229275,15229276,15229277,15229278,15229284,15229287,15229288,15229298,15229299,15229301,15229302,15229303,15229304,15229305,15229307,15229309,15229312,15229315,15229316,15229317,15229318,15229319,15229320,15229321,15229322,15229323,15229324,15229325,15229343,15229344}'::integer[]))
  • Rows Removed by Filter: 190
19. 1.179 1.179 ↑ 1.0 1 393

Index Scan using companies_pkey on companies co (cost=0.29..8.30 rows=1 width=69) (actual time=0.003..0.003 rows=1 loops=393)

  • Index Cond: (company_id = ho.company_id)
20. 0.394 3.930 ↑ 1.0 1 393

Nested Loop (cost=0.56..18.50 rows=1 width=17) (actual time=0.009..0.010 rows=1 loops=393)

  • Join Filter: ((mc.cap_rank)::text = (cpl.cap_rank)::text)
  • Rows Removed by Join Filter: 4
21. 0.395 3.144 ↑ 1.0 1 393

Nested Loop (cost=0.56..17.39 rows=1 width=22) (actual time=0.008..0.008 rows=1 loops=393)

22. 1.181 1.965 ↑ 1.0 1 393

Index Scan using market_cap_weekly_company_id_fkey_idx on market_cap_weekly mc (cost=0.28..14.13 rows=1 width=22) (actual time=0.005..0.005 rows=1 loops=393)

  • Index Cond: (co.company_id = company_id)
  • Filter: (as_on_date = (SubPlan 2))
23.          

SubPlan (for Index Scan)

24. 0.392 0.784 ↑ 1.0 1 392

Aggregate (cost=8.30..8.31 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=392)

25. 0.392 0.392 ↑ 1.0 1 392

Index Scan using market_cap_weekly_company_id_fkey_idx on market_cap_weekly mc1 (cost=0.28..8.30 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=392)

  • Index Cond: (mc.company_id = company_id)
26. 0.784 0.784 ↑ 1.0 1 392

Index Only Scan using uc_compnaycode on company_jn_fincode cjf (cost=0.28..3.26 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=392)

  • Index Cond: (company_id = mc.company_id)
  • Heap Fetches: 364
27. 0.392 0.392 ↑ 1.0 5 392

Seq Scan on cap_rank_list cpl (cost=0.00..1.05 rows=5 width=58) (actual time=0.001..0.001 rows=5 loops=392)

28. 1.965 1.965 ↑ 2.5 71 393

Seq Scan on industry ind (cost=0.00..4.74 rows=174 width=32) (actual time=0.001..0.005 rows=71 loops=393)

29. 0.393 0.393 ↑ 2.1 8 393

Seq Scan on sector sec (cost=0.00..1.17 rows=17 width=524) (actual time=0.001..0.001 rows=8 loops=393)

30. 2.751 2.751 ↑ 1.0 1 393

Index Scan using stock_price_daily_pkey on stock_price_daily pri (cost=0.56..8.21 rows=1 width=22) (actual time=0.007..0.007 rows=1 loops=393)

  • Index Cond: ((company_id = co.company_id) AND (as_of = '2020-01-08'::date))
31. 1.965 1.965 ↑ 3.0 1 393

Seq Scan on cost_inflation_index cii (cost=0.00..2.07 rows=3 width=5) (actual time=0.004..0.005 rows=1 loops=393)

  • Filter: (('2020-01-08'::date >= year_start_date) AND ('2020-01-08'::date <= year_end_date) AND (wef_date = $4))
  • Rows Removed by Filter: 60
32. 0.393 0.393 ↓ 0.0 0 393

Index Only Scan using scripcode_jn_fund_pkey on fund_jn_company fc (cost=0.28..4.29 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=393)

  • Index Cond: (company_id = ho.company_id)
  • Heap Fetches: 0
33. 0.786 0.786 ↓ 0.0 0 393

Hash Right Join (cost=7.00..10.05 rows=1 width=24) (actual time=0.002..0.002 rows=0 loops=393)

  • Hash Cond: (cat.category_id = fp.category_id)
34. 0.000 0.000 ↓ 0.0 0

Seq Scan on fund_categories cat (cost=0.00..2.76 rows=76 width=16) (never executed)

35. 0.000 0.000 ↓ 0.0 0 393

Hash (cost=6.99..6.99 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=393)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
36. 0.000 0.000 ↓ 0.0 0 393

Index Scan using fund_plans_pkey on fund_plans fp (cost=0.29..6.99 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=393)

  • Index Cond: (plan_id = fc.plan_id)
37. 0.000 0.000 ↑ 1.0 1 393

Materialize (cost=0.41..8.44 rows=1 width=9) (actual time=0.000..0.000 rows=1 loops=393)

38. 0.010 0.010 ↑ 1.0 1 1

Index Scan using currency_rates_pkey on currency_rates cr (cost=0.41..8.44 rows=1 width=9) (actual time=0.009..0.010 rows=1 loops=1)

  • Index Cond: (((currency_from_code)::text = 'INR'::text) AND ((currency_to_code)::text = 'INR'::text) AND (rate_date = '2020-01-08'::date))
39. 2.358 2.358 ↑ 1.0 1 393

Index Scan using stock_price_daily_pkey on stock_price_daily pri18 (cost=0.56..8.21 rows=1 width=24) (actual time=0.006..0.006 rows=1 loops=393)

  • Index Cond: ((company_id = co.company_id) AND (as_of = '2018-01-31'::date))
40. 0.000 0.000 ↑ 1.0 1 393

Materialize (cost=0.41..8.44 rows=1 width=9) (actual time=0.000..0.000 rows=1 loops=393)

41. 0.008 0.008 ↑ 1.0 1 1

Index Scan using currency_rates_pkey on currency_rates cr18 (cost=0.41..8.44 rows=1 width=9) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: (((currency_from_code)::text = 'INR'::text) AND ((currency_to_code)::text = 'INR'::text) AND (rate_date = '2018-01-31'::date))
42. 16.143 7,325.055 ↑ 4.2 393 1

GroupAggregate (cost=3,559,550.35..3,559,629.11 rows=1,658 width=48) (actual time=7,307.390..7,325.055 rows=393 loops=1)

  • Group Key: tx1.stock_holding_id, tx1.company_id
43. 1.343 7,308.912 ↓ 1.9 3,152 1

Subquery Scan on tx1 (cost=3,559,550.35..3,559,571.08 rows=1,658 width=206) (actual time=7,307.331..7,308.912 rows=3,152 loops=1)

44. 1.333 7,307.569 ↓ 1.9 3,152 1

Sort (cost=3,559,550.35..3,559,554.50 rows=1,658 width=258) (actual time=7,307.314..7,307.569 rows=3,152 loops=1)

  • Sort Key: ho_1.stock_holding_id, ho_1.company_id
  • Sort Method: quicksort Memory: 540kB
45. 3.357 7,306.236 ↓ 1.9 3,152 1

Hash Join (cost=3,483,374.04..3,559,461.69 rows=1,658 width=258) (actual time=7,288.937..7,306.236 rows=3,152 loops=1)

  • Hash Cond: (COALESCE(txn.txn_date, txn.reporting_date) = cr_1.rate_date)
46. 0.519 7,287.236 ↓ 2.6 3,152 1

Hash Left Join (cost=3,481,247.11..3,557,273.54 rows=1,216 width=168) (actual time=7,273.239..7,287.236 rows=3,152 loops=1)

  • Hash Cond: (txn.stock_demerger_id = sdm.stock_demerger_id)
47. 0.815 7,286.693 ↓ 2.6 3,152 1

Hash Join (cost=3,481,245.84..3,557,269.08 rows=1,216 width=162) (actual time=7,273.200..7,286.693 rows=3,152 loops=1)

  • Hash Cond: ((txn.txn_type_code)::text = (stt.stock_txn_type_code)::text)
48. 10.609 7,285.866 ↓ 2.6 3,152 1

Merge Join (cost=3,481,244.62..3,557,263.31 rows=1,216 width=84) (actual time=7,273.171..7,285.866 rows=3,152 loops=1)

  • Merge Cond: (cii_1.wef_date = ((SubPlan 4)))
  • Join Filter: ((COALESCE(txn.txn_date, txn.reporting_date) >= cii_1.year_start_date) AND (COALESCE(txn.txn_date, txn.reporting_date) <= cii_1.year_end_date))
  • Rows Removed by Join Filter: 75,648
49. 0.022 0.034 ↑ 1.0 61 1

Sort (cost=3.42..3.57 rows=61 width=17) (actual time=0.028..0.034 rows=61 loops=1)

  • Sort Key: cii_1.wef_date
  • Sort Method: quicksort Memory: 29kB
50. 0.012 0.012 ↑ 1.0 61 1

Seq Scan on cost_inflation_index cii_1 (cost=0.00..1.61 rows=61 width=17) (actual time=0.004..0.012 rows=61 loops=1)

51. 4.129 7,275.223 ↓ 2.2 78,776 1

Sort (cost=3,481,241.20..3,481,330.92 rows=35,889 width=79) (actual time=7,271.929..7,275.223 rows=78,776 loops=1)

  • Sort Key: ((SubPlan 4))
  • Sort Method: quicksort Memory: 540kB
52. 3.221 7,271.094 ↑ 11.4 3,152 1

Gather (cost=1,000.57..3,478,525.97 rows=35,889 width=79) (actual time=4,720.769..7,271.094 rows=3,152 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
53. 0.455 7,248.961 ↑ 4.7 3,152 1

Nested Loop (cost=0.57..3,473,937.07 rows=14,954 width=79) (actual time=4,719.943..7,248.961 rows=3,152 loops=1)

54. 7,244.576 7,244.576 ↓ 2.4 393 1

Parallel Seq Scan on stock_holdings ho_1 (cost=0.00..923,496.12 rows=164 width=16) (actual time=4,719.916..7,244.576 rows=393 loops=1)

  • Filter: (stock_holding_id = ANY ('{15228762,15228763,15228764,15228765,15228766,15228767,15228768,15228769,15228770,15228771,15228772,15228773,15228774,15228775,15228776,15228777,15228778,15228779,15228780,15228781,15228782,15228783,15228784,15228785,15228786,15228787,15228788,15228789,15228790,15228791,15228792,15228793,15228794,15228795,15228796,15228797,15228798,15228799,15228800,15228801,15228802,15228803,15228804,15228805,15228806,15228807,15228808,15228809,15228810,15228811,15228812,15228813,15228814,15228815,15228816,15228817,15228818,15228819,15228820,15228821,15228822,15228823,15228824,15228825,15228826,15228827,15228828,15228829,15228830,15228831,15228832,15228833,15228834,15228835,15228836,15228837,15228838,15228839,15228840,15228841,15228842,15228843,15228844,15228845,15228846,15228847,15228848,15228849,15228850,15228851,15228852,15228853,15228854,15228855,15228856,15228857,15228858,15228859,15228860,15228861,15228862,15228863,15228864,15228865,15228878,15228884,15228885,15228886,15228888,15228889,15228890,15228891,15228894,15228896,15228897,15228899,15228900,15228902,15228903,15228904,15228905,15228906,15228907,15228908,15228909,15228911,15228912,15228913,15228914,15228915,15228916,15228917,15228918,15228924,15228926,15228935,15228936,15228937,15228938,15228939,15228940,15228941,15228942,15228943,15228944,15228945,15228946,15228947,15228948,15228949,15228950,15228951,15228952,15228953,15228954,15228955,15228956,15228957,15228958,15228959,15228960,15228961,15228962,15228963,15228964,15228965,15228966,15228967,15228968,15228969,15228970,15228971,15228972,15228973,15228974,15228975,15228976,15228977,15228978,15228979,15228980,15228981,15228982,15228983,15228984,15228985,15228986,15228987,15228988,15228989,15228990,15228991,15228992,15228993,15228994,15228995,15228996,15228997,15228998,15228999,15229000,15229001,15229002,15229003,15229004,15229005,15229006,15229007,15229008,15229009,15229010,15229011,15229012,15229013,15229014,15229015,15229016,15229017,15229018,15229019,15229020,15229021,15229022,15229023,15229024,15229025,15229026,15229027,15229028,15229029,15229030,15229031,15229032,15229033,15229034,15229035,15229036,15229037,15229038,15229039,15229040,15229041,15229042,15229043,15229044,15229045,15229046,15229047,15229048,15229049,15229050,15229051,15229052,15229053,15229054,15229055,15229056,15229057,15229058,15229059,15229060,15229061,15229062,15229063,15229064,15229065,15229066,15229067,15229068,15229069,15229070,15229071,15229072,15229073,15229074,15229075,15229076,15229077,15229078,15229079,15229080,15229081,15229082,15229083,15229084,15229085,15229086,15229087,15229088,15229089,15229090,15229091,15229092,15229093,15229094,15229095,15229096,15229097,15229098,15229099,15229100,15229101,15229102,15229103,15229104,15229105,15229106,15229107,15229108,15229109,15229110,15229111,15229112,15229113,15229114,15229115,15229116,15229117,15229118,15229119,15229120,15229121,15229122,15229123,15229124,15229125,15229126,15229127,15229128,15229137,15229138,15229139,15229140,15229141,15229147,15229149,15229152,15229154,15229155,15229157,15229158,15229161,15229162,15229163,15229164,15229165,15229166,15229167,15229208,15229215,15229225,15229226,15229228,15229233,15229237,15229244,15229247,15229248,15229249,15229256,15229272,15229273,15229274,15229275,15229276,15229277,15229278,15229284,15229287,15229288,15229298,15229299,15229301,15229302,15229303,15229304,15229305,15229307,15229309,15229312,15229315,15229316,15229317,15229318,15229319,15229320,15229321,15229322,15229323,15229324,15229325,15229343,15229344}'::integer[]))
  • Rows Removed by Filter: 3,458,880
55. 3.930 3.930 ↑ 569.9 8 393

Index Scan using stock_txns_holding_id_fkey_idx on stock_txns txn (cost=0.57..15,505.88 rows=4,559 width=71) (actual time=0.003..0.010 rows=8 loops=393)

  • Index Cond: (stock_holding_id = ho_1.stock_holding_id)
  • Filter: (COALESCE(txn_date, reporting_date) <= '2020-01-08'::date)
56.          

SubPlan (for Gather)

57. 0.000 18.912 ↑ 1.0 1 3,152

Limit (cost=2.10..2.10 rows=1 width=4) (actual time=0.006..0.006 rows=1 loops=3,152)

58. 3.152 18.912 ↑ 7.0 1 3,152

Sort (cost=2.10..2.12 rows=7 width=4) (actual time=0.006..0.006 rows=1 loops=3,152)

  • Sort Key: cii2_1.wef_date DESC
  • Sort Method: quicksort Memory: 25kB
59. 15.760 15.760 ↑ 3.5 2 3,152

Seq Scan on cost_inflation_index cii2_1 (cost=0.00..2.07 rows=7 width=4) (actual time=0.003..0.005 rows=2 loops=3,152)

  • Filter: ((COALESCE(txn.txn_date, txn.reporting_date) >= year_start_date) AND (COALESCE(txn.txn_date, txn.reporting_date) <= year_end_date) AND (wef_date <= '2020-01-08'::date))
  • Rows Removed by Filter: 59
60. 0.003 0.012 ↑ 1.0 10 1

Hash (cost=1.10..1.10 rows=10 width=124) (actual time=0.012..0.012 rows=10 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
61. 0.009 0.009 ↑ 1.0 10 1

Seq Scan on stock_txn_types stt (cost=0.00..1.10 rows=10 width=124) (actual time=0.007..0.009 rows=10 loops=1)

62. 0.007 0.024 ↓ 4.2 50 1

Hash (cost=1.12..1.12 rows=12 width=14) (actual time=0.024..0.024 rows=50 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
63. 0.017 0.017 ↓ 4.2 50 1

Seq Scan on stock_demergers sdm (cost=0.00..1.12 rows=12 width=14) (actual time=0.011..0.017 rows=50 loops=1)

64. 5.012 15.643 ↓ 1.1 35,064 1

Hash (cost=1,728.80..1,728.80 rows=31,850 width=9) (actual time=15.643..15.643 rows=35,064 loops=1)

  • Buckets: 65,536 (originally 32768) Batches: 1 (originally 1) Memory Usage: 2,019kB
65. 10.631 10.631 ↓ 1.1 35,064 1

Seq Scan on currency_rates cr_1 (cost=0.00..1,728.80 rows=31,850 width=9) (actual time=0.149..10.631 rows=35,064 loops=1)

  • Filter: (((currency_from_code)::text = 'INR'::text) AND ((currency_to_code)::text = 'INR'::text))
  • Rows Removed by Filter: 32,584
66.          

SubPlan (for Merge Join)

67. 0.393 4.323 ↓ 0.0 0 393

Nested Loop (cost=1.00..16,728.11 rows=79 width=0) (actual time=0.011..0.011 rows=0 loops=393)

68. 0.786 0.786 ↑ 1.0 1 393

Index Only Scan using stock_holdings_pkey on stock_holdings ho_2 (cost=0.43..8.45 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=393)

  • Index Cond: (stock_holding_id = ho.stock_holding_id)
  • Heap Fetches: 0
69. 3.144 3.144 ↓ 0.0 0 393

Index Scan using stock_txns_holding_id_fkey_idx on stock_txns txn_1 (cost=0.57..16,718.87 rows=79 width=8) (actual time=0.008..0.008 rows=0 loops=393)

  • Index Cond: (stock_holding_id = ho.stock_holding_id)
  • Filter: ((txn_type_code)::text = ANY ('{SPLIT,BUYMERGER,BUYDEMERGER}'::text[]))
  • Rows Removed by Filter: 8