"Sort (cost=189622.96..189622.96 rows=1 width=50) (actual time=37398.711..37403.323 rows=11355 loops=1)"
" Output: ed.effectivedate, (concat(symgv.gvkey, '_', symgv.iid)), ed.dataitemid, ed.dataitemvalue"
" Sort Key: (concat(symgv.gvkey, '_', symgv.iid)), ed.effectivedate"
" Sort Method: quicksort Memory: 1272kB"
" Buffers: shared hit=496392 read=75918"
" -> Nested Loop (cost=126791.37..189622.95 rows=1 width=50) (actual time=7728.769..37380.800 rows=11355 loops=1)"
" Output: ed.effectivedate, concat(symgv.gvkey, '_', symgv.iid), ed.dataitemid, ed.dataitemvalue"
" Join Filter: (((ed.effectivedate >= symgv.symbolstartdate) OR (symgv.symbolstartdate IS NULL)) AND ((ed.effectivedate <= symgv.symbolenddate) OR (symgv.symbolenddate IS NULL)))"
" Rows Removed by Join Filter: 8"
" Buffers: shared hit=496392 read=75918"
" -> Nested Loop (cost=126791.23..179784.77 rows=1 width=30) (actual time=7728.726..12331.756 rows=1943 loops=1)"
" Output: ec.estimateconsensusid, symgv.gvkey, symgv.iid, symgv.symbolstartdate, symgv.symbolenddate"
" Inner Unique: true"
" Buffers: shared hit=17214 read=69041"
" -> Hash Join (cost=126791.15..179776.82 rows=1 width=42) (actual time=7728.695..12286.723 rows=1943 loops=1)"
" Output: s.companyid, ep.companyid, ec.estimateconsensusid, symgv.gvkey, symgv.iid, symgv.relatedcompanyid, symgv.symbolstartdate, symgv.symbolenddate"
" Hash Cond: (ec.estimateperiodid = ep.estimateperiodid)"
" Buffers: shared hit=9278 read=69035"
" -> Seq Scan on public.ciqestimateconsensus ec (cost=0.00..48628.12 rows=5810060 width=8) (actual time=0.050..2532.995 rows=5806833 loops=1)"
" Output: ec.estimateconsensusid, ec.estimateperiodid, ec.tradingitemid, ec.accountingstandardid, ec.parentflag, ec.primaryparentconsolflag"
" Buffers: shared hit=2592 read=34416"
" -> Hash (cost=126791.14..126791.14 rows=1 width=42) (actual time=6922.466..6922.466 rows=2272 loops=1)"
" Output: s.companyid, ep.companyid, ep.estimateperiodid, symgv.gvkey, symgv.iid, symgv.relatedcompanyid, symgv.symbolstartdate, symgv.symbolenddate"
" Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 169kB"
" Buffers: shared hit=6686 read=34619"
" -> Gather Merge (cost=126768.72..126791.14 rows=1 width=42) (actual time=5462.711..6920.944 rows=2272 loops=1)"
" Output: s.companyid, ep.companyid, ep.estimateperiodid, symgv.gvkey, symgv.iid, symgv.relatedcompanyid, symgv.symbolstartdate, symgv.symbolenddate"
" Workers Planned: 2"
" Workers Launched: 2"
" Buffers: shared hit=18750 read=107327"
" -> Merge Join (cost=125768.71..125791.03 rows=1 width=42) (actual time=5415.457..6705.583 rows=757 loops=3)"
" Output: s.companyid, ep.companyid, ep.estimateperiodid, symgv.gvkey, symgv.iid, symgv.relatedcompanyid, symgv.symbolstartdate, symgv.symbolenddate"
" Merge Cond: (ep.companyid = s.companyid)"
" Buffers: shared hit=18750 read=107327"
" Worker 0: actual time=5452.956..6763.670 rows=701 loops=1"
" Buffers: shared hit=7063 read=33639"
" Worker 1: actual time=5341.348..6523.793 rows=578 loops=1"
" Buffers: shared hit=5001 read=39069"
" -> Sort (cost=111576.76..111587.92 rows=22315 width=8) (actual time=2596.068..3211.706 rows=992708 loops=3)"
" Output: ep.companyid, ep.estimateperiodid"
" Sort Key: ep.companyid"
" Sort Method: quicksort Memory: 104259kB"
" Buffers: shared hit=200 read=99905"
" Worker 0: actual time=2601.219..3206.842 rows=987039 loops=1"
" Buffers: shared hit=134 read=31894"
" Worker 1: actual time=2627.921..3191.238 rows=1043371 loops=1"
" Buffers: shared hit=52 read=35344"
" -> Parallel Seq Scan on public.ciqestimateperiod ep (cost=0.00..111254.41 rows=22315 width=8) (actual time=0.031..1418.178 rows=1219284 loops=3)"
" Output: ep.companyid, ep.estimateperiodid"
" Filter: (ep.periodtypeid = 2)"
" Rows Removed by Filter: 2346786"
" Buffers: shared hit=192 read=99905"
" Worker 0: actual time=0.036..1382.137 rows=1193926 loops=1"
" Buffers: shared hit=130 read=31894"
" Worker 1: actual time=0.043..1445.611 rows=1288317 loops=1"
" Buffers: shared hit=48 read=35344"
" -> Sort (cost=14191.95..14191.95 rows=1 width=34) (actual time=2799.067..2799.405 rows=758 loops=3)"
" Output: s.companyid, symgv.gvkey, symgv.iid, symgv.relatedcompanyid, symgv.symbolstartdate, symgv.symbolenddate"
" Sort Key: s.companyid"
" Sort Method: quicksort Memory: 26kB"
" Buffers: shared hit=18550 read=7422"
" Worker 0: actual time=2818.783..2819.090 rows=702 loops=1"
" Buffers: shared hit=6929 read=1745"
" Worker 1: actual time=2703.313..2703.558 rows=579 loops=1"
" Buffers: shared hit=4949 read=3725"
" -> Hash Join (cost=12203.93..14191.95 rows=1 width=34) (actual time=2633.140..2799.032 rows=14 loops=3)"
" Output: s.companyid, symgv.gvkey, symgv.iid, symgv.relatedcompanyid, symgv.symbolstartdate, symgv.symbolenddate"
" Inner Unique: true"
" Hash Cond: ((symgv.relatedcompanyid = s.companyid) AND (ti.securityid = s.securityid))"
" Buffers: shared hit=18550 read=7422"
" Worker 0: actual time=2629.856..2818.747 rows=14 loops=1"
" Buffers: shared hit=6929 read=1745"
" Worker 1: actual time=2598.458..2703.281 rows=14 loops=1"
" Buffers: shared hit=4949 read=3725"
" -> Hash Join (cost=6530.16..8508.82 rows=8908 width=34) (actual time=1636.665..1802.525 rows=14 loops=3)"
" Output: ti.securityid, symgv.gvkey, symgv.iid, symgv.relatedcompanyid, symgv.symbolstartdate, symgv.symbolenddate"
" Inner Unique: true"
" Hash Cond: (symgv.objectid = ti.tradingitemid)"
" Buffers: shared hit=11383 read=3893"
" Worker 0: actual time=1645.083..1833.942 rows=14 loops=1"
" Buffers: shared hit=3904 read=1190"
" Worker 1: actual time=1636.292..1741.086 rows=14 loops=1"
" Buffers: shared hit=3049 read=2045"
" -> Seq Scan on public.ciqgvkeyiid symgv (cost=0.00..1973.99 rows=8908 width=34) (actual time=22.689..188.512 rows=14 loops=3)"
" Output: symgv.symbolid, symgv.gvkey, symgv.iid, symgv.relatedcompanyid, symgv.exchangeid, symgv.objectid, symgv.symbolstartdate, symgv.symbolenddate, symgv.activeflag"
" Filter: (concat(symgv.gvkey, '_', symgv.iid) = ANY ('{153130_01,154357_01,155393_01,155394_02,156155_01,156613_01,156861_01,157057_01,001045_04,001075_01,001078_01,001161_01,001177_01}'::text[]))"
" Rows Removed by Filter: 136713"
" Buffers: shared hit=3570"
" Worker 0: actual time=25.596..214.417 rows=14 loops=1"
" Buffers: shared hit=1192"
" Worker 1: actual time=17.774..122.530 rows=14 loops=1"
" Buffers: shared hit=1192"
" -> Hash (cost=5070.07..5070.07 rows=584035 width=8) (actual time=1608.608..1608.608 rows=578164 loops=3)"
" Output: ti.securityid, ti.tradingitemid"
" Buckets: 1048576 Batches: 1 Memory Usage: 30777kB"
" Buffers: shared hit=7813 read=3893"
" Worker 0: actual time=1609.907..1609.908 rows=578164 loops=1"
" Buffers: shared hit=2712 read=1190"
" Worker 1: actual time=1613.771..1613.771 rows=578164 loops=1"
" Buffers: shared hit=1857 read=2045"
" -> Seq Scan on public.ciqtradingitem ti (cost=0.00..5070.07 rows=584035 width=8) (actual time=0.029..1132.272 rows=578164 loops=3)"
" Output: ti.securityid, ti.tradingitemid"
" Buffers: shared hit=7813 read=3893"
" Worker 0: actual time=0.040..1143.503 rows=578164 loops=1"
" Buffers: shared hit=2712 read=1190"
" Worker 1: actual time=0.035..1139.358 rows=578164 loops=1"
" Buffers: shared hit=1857 read=2045"
" -> Hash (cost=4391.11..4391.11 rows=427555 width=8) (actual time=987.185..987.186 rows=409250 loops=3)"
" Output: s.companyid, s.securityid"
" Buckets: 524288 Batches: 1 Memory Usage: 20083kB"
" Buffers: shared hit=7081 read=3527"
" Worker 0: actual time=960.208..960.209 rows=409250 loops=1"
" Buffers: shared hit=2983 read=553"
" Worker 1: actual time=959.610..959.611 rows=409250 loops=1"
" Buffers: shared hit=1856 read=1680"
" -> Seq Scan on public.ciqsecurity s (cost=0.00..4391.11 rows=427555 width=8) (actual time=0.026..657.271 rows=409250 loops=3)"
" Output: s.companyid, s.securityid"
" Buffers: shared hit=7081 read=3527"
" Worker 0: actual time=0.034..612.065 rows=409250 loops=1"
" Buffers: shared hit=2983 read=553"
" Worker 1: actual time=0.027..637.288 rows=409250 loops=1"
" Buffers: shared hit=1856 read=1680"
" -> Index Only Scan using pk_ciqcompany on public.ciqcompany c (cost=0.09..7.95 rows=1 width=4) (actual time=0.020..0.020 rows=1 loops=1943)"
" Output: c.companyid"
" Index Cond: (c.companyid = s.companyid)"
" Heap Fetches: 1943"
" Buffers: shared hit=7936 read=6"
" -> Index Scan using pk_ciqestimatenumericdata on public.ciqestimatenumericdata ed (cost=0.14..9828.22 rows=3321 width=22) (actual time=4.875..12.866 rows=6 loops=1943)"
" Output: ed.estimateconsensusid, ed.dataitemid, ed.effectivedate, ed.todate, ed.dataitemvalue, ed.splitfactor, ed.currencyid, ed.estimatescaleid, ed.pacvertofeedpop"
" Index Cond: ((ed.estimateconsensusid = ec.estimateconsensusid) AND (ed.dataitemid = ANY ('{100179,100186,100193,100200,100207,100214,100221,100235,100242,100249,100256,100263,100270,100277,100284,104019,104061,104082,104096,104103,104117,104124,105068,105075,105082,105114,105125,105299,105307,105321,114154,114165,114176,114187,114198,114209,114220,115403,115416,115429,115442,115455,115468,115481,115494,115507,115520,115533,115591}'::integer[])) AND (ed.effectivedate >= '2000-01-01 00:00:00'::timestamp without time zone) AND (ed.effectivedate <= '2018-12-24 00:00:00'::timestamp without time zone))"
" Buffers: shared hit=479178 read=6877"
"Planning time: 4.244 ms"
"Execution time: 37416.184 ms"