Attached Files | QueryPlan.txt [^] (61,989 bytes) 2018-02-14 05:00 [Show Content] [Hide Content]*******************************
selectFromShipmentSOTrxCombo method query:-
*******************************
EXPLAIN ANALYZE SELECT s.M_InOut_ID AS ID,
Ad_Column_Identifier(to_char('M_InOut'), to_char(s.M_InOut_ID), to_char('en_US')) AS NAME
FROM M_INOUT s
WHERE s.IsSOTrx='Y'
AND s.ISLOGISTIC <> 'Y'
AND s.DocStatus IN ('CL',
'CO')
AND s.AD_Client_ID IN ('0',
'8B72EA2C5B444DE291849E37F2F86DBA')
AND s.AD_Org_ID IN ( '0', '306D3B3010FB47C8830A3CD6544CB71D',
'A25CF246A7B94A4A92B0C0D74878D227',
'CBC7D0B4DEB04192ABA391687EAE0F61',
'3F52F6C378274F8EA1A9A1A10D15E21E',
'C14CFAB09B594263AB5C99A82937E427',
'E453C89517DD4FB3A2EBB9EF79808E3A',
'E3ADD08E7A344BC4AA0E5271A00EE1AB',
'48C21BE2F1A449A8AD397A7D1B3F2C18',
'318A3152361C46959E07EC1393D1C7CE',
'E3353FB57805410D9515EFA23737C399',
'AB40EE591DBE44F093E4C5B606D354C6',
'A31788F217B448728321DDB7800D1808',
'3CB045196B7547DFAE80DC60193B687A',
'362AAC83D0D94AB5B802E2FDDA49A8E0',
'5F7B6E84D15843E69C4ED7D97444D478',
'40C5CBF3762A4BDA85058E1D837E03E4',
'8BD961208E0244D99F31700FFAC12341',
'6D3322D0CEFE40FBB5ADCE995C9A5E18',
'D2FF042B470147AB81BC7B993D63214C',
'B31B3BFBBE154ACB93897A42C9FF351C',
'2DE44FC9B33847FEB69C2908E1FBC1C2',
'E7F4AC1093684F15B5954A5818076653',
'3A1097E45C4243F6BBE926EA3D947E3F',
'5F0B6579C951489A936A683A426A132E',
'9FC6900EC6D04B55B3F831FA09121E32',
'D46CCA95EB5542A5973BAEEF312F6A0D',
'EC9580A5DE2F4AADA9ECC42D34702571',
'25E8B7AA299A492D9EF6B2B99B864419',
'316DC99A97B844CDBE9E20003A16C0F3',
'5F49108E9AA24990A0EBC198DF40CE54',
'5305CF0416744873BB2DF46386354A31',
'9A3DA17921AD4C52A79C2359B0BBC981',
'BADC1A86EB20423FA958DE0B65CC381F',
'A8B01CD45FDA490AA2FBF2A857249345',
'63022951ABB74A86B790E95F52E40F58',
'FAF808E5C3F349248230456BFC11C6B8',
'53D2871ECE304BB09604AF4D0FF3D7F1',
'A892B2A07E2643C1845C99F4E687862B',
'D8CF30DCA6AB43F69021C95005E6BD13',
'D9AD12FC3BBA499DA29BDB45ADCE6D5A',
'FB5802AE5E284CCE8B1AEF307089595B',
'A5112471313A4F0199F10514E5DF2BBE',
'4B67D434A6DD44A69A1EAE1D74C83562',
'18B60CB5A6174D169BA790216E002B4D',
'7BCCA05C769C44E395EDA1AC27A56A03',
'E6EAD13FC35445AE9BD81901F0624172',
'6F67E7FC52C444CFA0D7B7E95F5FEDB8',
'158F30646EE949ABB8B637F09BC79AED',
'327EF8CB2F564BA99F20687CD8AA35F1',
'53479AE940E744B5B3624BE316062075',
'325EDF84AA9C4395AAD33A14F59BE6A1',
'E43A0CFA32F044C6B381E8771ED0DD7C',
'2F3F3D5938D84A67811FBF8A27162690',
'7EBDA22E5A664C56A56C28C3D26DC092',
'E70FD5E6A6B04477A2200D9C43E78A24',
'98C02C1EB0224902AAE5171D347AC76B',
'1CDFEC4B6E2140D6843D25ADB328128E',
'2653FE69D1DE43C8ADC3D1E20505B430',
'0C6AAE6CBB6842739797E8E20048E91A',
'D96638F06E794FA5825D23E36EFFB9D1',
'8EA4BA1E749B4C388AB7A8F976788D56',
'6A2500E55D034D7B8EB13D06878A1D9B',
'A0CA35EECA0F42229D8410545ACB68E3',
'C34B8B66DDF244B8A3A908C53EBB16F6',
'1FCF5E2FDCB2450F806A675AB07193A7',
'F788E977C5B64ED7A85169BA5236589E',
'E4B776F73C724DD7A5B323E0B2E841BA',
'08189B9A7D844CBCAFE14A7FB9B96913',
'B147B3EC7A8D42A4A608053D0BBDA16A',
'D47DAC0B366F483BAA194C5343D319C0',
'E279CA67D8CA43F5AEC3F4CA84214406',
'CCBEF4528C9A42BD9DB5DD3BF8173728',
'55477A2045D3473B8F4206A86698E6D2',
'5FAE4EEA12BD4A688A15C8E37EE3EBD7',
'67D855B636114782AD040B50B7228692',
'103BEA21E8E542D2A034A31770ADE05F',
'AF4BA739CCEA492B833CD43A77A33C6D',
'66FE8861B05B4347A044EDFF1014A288',
'092B255D7EC74A3FA5525FC569B3F71E',
'4D9E8560D45A460480F4A1149D08606E',
'E058BB072CFA44B2B6C100566EAADEED',
'319E8635613743318EA26DBD03BC882C',
'19F0E53F8AA44F4A8C0B61C1A747688D',
'2133FE47A7324CDA80EE68FF45E61E05',
'8FBFE61810E4454F8E1246C7981F1551',
'7A31597C9469404EB6F07F8DDDC6DE3E',
'70361055E36D43EAABBE36524BCEF26D',
'4F3851920A7449BA903F88A3136A7F17',
'87652CFFDAD949FABD8B9C568435E3EF',
'2D104264E8E74EA58549EE603BCD8AEA',
'A6D118067C8B403985AD754E3AFD075A',
'A67CC53B0AD04B07B9419AE42A731707',
'9C6267A300964551B8EB72221E0E6D33',
'4531AF4A7F3A422DA80ABA2B6B45E657',
'309E9A1B24C6496B9D79AC17C0886209',
'993AA85D1C7747E09823747874BCC4F3',
'469016B267C84C208442E2696C9D400A',
'1B693F0BE60F4C56A0BA89BDE1DC55B1',
'3BA5DBAB24F6422580F083DA3776FD08',
'3794C31D03A643EE928C8A5358E12853',
'76A2DDBEC2224AEDBF71A320A6667987',
'DFE5315B13BB4F8F821774FE4A49D46C',
'78F45D18B38048E9901DE1F0102384DC',
'C984287036394AF6943C8F93B78E4506',
'F71E03783E794EA6B72CF90DF5B7DBA5',
'D0B0F660DF9A4F609C00BD619EBB0F51',
'AD55542CD1F54C208E7F7B58EC65C008',
'2432C0FB102D4451908EDA04A6642190',
'535C96CDB35F49BB801321F522FB2B96',
'C853ABFC80E74DC4BB82967F029D42E2',
'2324EF6B39E54D17BACC2684CF4F16AA',
'E340A0C8A88C443BB8FAB9FCDF844FD8',
'6D005AF435DA48C183ACA2B0E81EDD8F',
'2C743FE937A9485492069A2DFD5C1503',
'C82D39BA61EE465E95EB5D9C16B5A5F8',
'975DDFA55BAD4CB9AF9B8435DD12D7A0',
'8D2AAA7E604C47DE81535132E0E6C48B',
'2644B64E7DC843C1A49EEED5C9AD8861',
'C4E159A41C614709867FD47F8455B218',
'CD18CEA3A5F6443E9B47DA2076F03C03',
'09868DD506E044AEB71468EA45014280',
'FFC21A886B7B442A8939CF67950E815A',
'783B64B7E16E4469BDAD56E05AF5403B',
'806B5D2219004E21AD2EA379FE966670',
'0598DB73327A4B4CBE02684086122065',
'16ACC38D0A22432E80DD09FF717B6224',
'EFB204879DDD41D396B2FB3A5E029323',
'C774409334DC43FDBC3FE3687D9DDE69',
'FF0C52506A3945EFB25591C780D8EB98',
'5D047A3692B840F58CBCDA2F54D8CF7D',
'82BBDFEC32274B72AB27A8E1D453F514',
'2ED7CF7C8C574B4BB9FA8AEA512D4D63',
'FB83A1D3A97D4CE099FC66AB24FBFFCA',
'B1D84FD139D84CB3AAB1A03CDFD6B579',
'FA91DD8960124653AE9B01E2F8655687',
'A64FB0CB369043F29A1C20EC1E613F8A',
'8280E4BDF99642E7A5FBFB6427D236FD',
'BFBAC410E31D4DE3B2CB6CAA31341CEA',
'DFCC55A6294C425F9E9A2776F0E0DC65',
'182152C8710A463CA2D015AB770F4193',
'31825820459F42EEADBA2E15A3F1D1FA',
'A1F5B06F460F4F67BBBC6AC3FE27AE85',
'DF65A343ABA543CF88B7A6DCD52380A3',
'D9CC311BEE7B435EA13ED5359665FA1C',
'A23C7BE09AA344D0BB7E8ACECCF84B9B',
'092895CF76EA44FABC262980D8A156D9',
'62CD82E1A1024DC8AB12DB0E4338674D',
'617419D69ADC49F0A5E84CE7807233EE',
'64FF896979C74E799DDE3F383812E4F1',
'CE80F7CD48AD494BA9C51D29CF2A8773',
'D31CC43D89D242EFBAB45C84ABCE1FF4',
'4F376722D18F42DBB0E86866B7017F50',
'F0D1C82A28DE4E0995FFD646E7A5A24D',
'D4D7E44F737644069A7C8FFE2A577E7A',
'DB90663FCEC343B6BDF99BB21C63C02F',
'6A3B7B0E57DD48CEACE2981F1C7C81ED',
'04FFD14E863C427B9E95FDD273059339',
'7A3EBF715DBB43258B29BFCBA7E8F8ED',
'71329097F6AD4455A6193BA551993DF2',
'45F69D028C46421C9B2897B1EB3EDD4E',
'26654E04FDD4405CBDB9334070DC2026',
'AB585C50B9934FEE8D6DCC141AECA3EE',
'2D288394D33F449F8C5BE09A23B5F97B',
'288B1466C1024455A5C80DE9944C275E',
'16303BD6F5C74355A3E6ED4DB60B8A67',
'469ACE6358FB4C0EA58058FA823EAFEC',
'0D796DFE59D0443E93A2CA46F607886E',
'790BA1D65CA34B72AFA6ED87355A6337',
'9228CFE725604EA0BF01C676B5C5E72A',
'BF77D03787D84C9888FCFBD012BFDA02',
'043D618911174C8D85F2B97407B3B652',
'08537956D91D40B69AE040254CAF341E',
'DDDD4C61896142B78A1EA29105A082AD',
'BDA0ECE46C39499491FD6149E787C9F4',
'96B08A8DB32C49E2A809E156DB592842',
'D3E00B67031D4A309FE917292CF1F719',
'77D3336DC2214AE6A7304A23FD35A805',
'F04CEDB8E1FC4341958071416F24AD05',
'2484267157304B488B71329DDB3D8421',
'D76C8E0696EA4C62B38DBD29ACB602E7',
'F3CE6131A1674567ADC67FA3FD764B7E',
'6B6A074DD75A415C958AC44CA5755B60',
'38D225ED623B4E13B78C2C917579E440',
'6A247D9E877C4A5689C8A90BCBD8F957',
'537C0C44F0C740CA917101B6413C9AB5',
'C851613D607F47F99AAD8516BBA438F4',
'1955B39FD1884AB180F1F69F45C0B1BE',
'43C4BA0AFB8B486B9AACBD519E403AD9',
'1526521C6C704155A625CF21CE913BF4',
'0917477F7B8B48228D2A13D8B5E5D0C7',
'D1331BB2694840FD8B38D5857E4D8C05',
'317DAAB1CF49470CA3FD565D773666DD',
'943596C335724B139171B9EDA473DA53',
'9178C2F840EB4CD9B1098A333EBFA992',
'B8184BF4838A4B4FA7809FDCBB25504E',
'AEDAF1F20FAF44FC93AB35D2DFD3E5C5',
'B6E2D1B581464191AD48AFF6AED9B813',
'C2BAA87926B14FCCB7B6C481EFAA395C',
'972455AB23EC47A1A2C31B53F5C06E68',
'8969F75D79B6402BA45B7DF1EA54435D',
'531F3B4C89EC4BF180B6616F94656FA1',
'E853EC3DE4244365BE97935652115E35',
'043739981A1D4C5BBACAC37926B2104C',
'9D1090AFC1D043B2A8086A4FFF8D31E4',
'8DF1BD24A1EB4F4F918E75236873A402',
'00FC5F98BDE047F99C062F6ABD2DCB9B',
'F5CA78C4CDAC45758F3D3518EB2938C5',
'6027B0644E5E4A238FBD6CAC1F44DDE3',
'15F7BFB3DA804535BDD03E216EB851B4',
'2CD3172D63644694A19E7BE676B63362',
'696A3525F40E4E01B538CF3E729CB410',
'68269B60854A41C48A55EC4FB363E5F3',
'B54CFF4B5FED44A9853F2F6FA3FFC931',
'11009FD31FA045C3910556DDB72C5817',
'86B7EAE491FF4025946652B3423A4EB5',
'C83B8D6D3DBA455B8C4973F68D8E2F59',
'FD8E0F9DA2124FCB954859AB6F48755F' )
AND s.C_BPartner_ID = '486F7C82A6C8446F84BC134EEB3B7066'
AND s.iscompletelyinvoiced = 'N'
AND EXISTS
(SELECT 1
FROM M_INOUTLINE l
LEFT JOIN c_orderline ol ON l.c_orderline_id = ol.c_orderline_id
LEFT JOIN c_order o ON ol.c_order_id = o.c_order_id
LEFT JOIN m_pricelist pl ON pl.m_pricelist_id = o.m_pricelist_id
LEFT JOIN c_invoiceline il ON l.m_inoutline_id = il.m_inoutline_id
LEFT JOIN c_invoice i ON il.c_invoice_id = i.c_invoice_id
WHERE l.M_INOUT_ID = s.M_INOUT_ID
AND (l.c_orderline_id IS NULL
OR pl.istaxincluded = 'Y')
GROUP BY l.m_inoutline_id,
l.movementqty
HAVING (l.movementqty >= 0
AND l.movementqty > Sum(COALESCE(CASE
WHEN i.docstatus = 'CO' THEN il.qtyinvoiced
ELSE 0
END, 0)))
OR (l.movementqty < 0
AND l.movementqty < Sum(COALESCE(CASE
WHEN i.docstatus = 'CO' THEN il.qtyinvoiced
ELSE 0
END, 0))))
AND NOT EXISTS
(SELECT 1
FROM C_ORDER o,
C_ORDERLINE ol
WHERE o.C_ORDER_ID = s.C_ORDER_ID
AND ((o.INVOICERULE = 'O' AND O.isdelivered = 'N') OR o.INVOICERULE = 'N'))
ORDER BY NAME;
Sort (cost=1920072777.74..1920072788.40 rows=4264 width=33) (actual time=1570.160..1570.503 rows=2362 loops=1)
Sort Key: (ad_column_identifier('M_InOut'::character varying, to_char(s.m_inout_id), 'en_US'::character varying))
Sort Method: quicksort Memory: 429kB
-> Nested Loop Anti Join (cost=26614.70..1920072520.66 rows=4264 width=33) (actual time=81.054..1556.344 rows=2362 loops=1)
-> Bitmap Heap Scan on m_inout s (cost=26613.71..44935807.91 rows=4279 width=66) (actual time=77.917..524.041 rows=2362 loops=1)
Recheck Cond: ((iscompletelyinvoiced = 'N'::bpchar) AND ((c_bpartner_id)::text = '486F7C82A6C8446F84BC134EEB3B7066'::text))
Filter: ((islogistic <> 'Y'::bpchar) AND ((docstatus)::text = ANY ('{CL,CO}'::text[])) AND ((ad_client_id)::text = ANY ('{0,8B72EA2C5B444DE291849E37F2F86DBA}'::text[])) AND (issotrx = 'Y'::bpchar) AND ((ad_org_id)::text = ANY ('{0,306D3B3010FB47C8830A3CD6544CB71D,A25CF246A7B94A4A92B0C0D74878D227,CBC7D0B4DEB04192ABA391687EAE0F61,3F52F6C378274F8EA1A9A1A10D15E21E,C14CFAB09B594263AB5C99A82937E427,E453C89517DD4FB3A2EBB9EF79808E3A,E3ADD08E7A344BC4AA0E5271A00EE1AB,48C21BE2F1A449A8AD397A7D1B3F2C18,318A3152361C46959E07EC1393D1C7CE,E3353FB57805410D9515EFA23737C399,AB40EE591DBE44F093E4C5B606D354C6,A31788F217B448728321DDB7800D1808,3CB045196B7547DFAE80DC60193B687A,362AAC83D0D94AB5B802E2FDDA49A8E0,5F7B6E84D15843E69C4ED7D97444D478,40C5CBF3762A4BDA85058E1D837E03E4,8BD961208E0244D99F31700FFAC12341,6D3322D0CEFE40FBB5ADCE995C9A5E18,D2FF042B470147AB81BC7B993D63214C,B31B3BFBBE154ACB93897A42C9FF351C,2DE44FC9B33847FEB69C2908E1FBC1C2,E7F4AC1093684F15B5954A5818076653,3A1097E45C4243F6BBE926EA3D947E3F,5F0B6579C951489A936A683A426A132E,9FC6900EC6D04B55B3F831FA09121E32,D46CCA95EB5542A5973BAEEF312F6A0D,EC9580A5DE2F4AADA9ECC42D34702571,25E8B7AA299A492D9EF6B2B99B864419,316DC99A97B844CDBE9E20003A16C0F3,5F49108E9AA24990A0EBC198DF40CE54,5305CF0416744873BB2DF46386354A31,9A3DA17921AD4C52A79C2359B0BBC981,BADC1A86EB20423FA958DE0B65CC381F,A8B01CD45FDA490AA2FBF2A857249345,63022951ABB74A86B790E95F52E40F58,FAF808E5C3F349248230456BFC11C6B8,53D2871ECE304BB09604AF4D0FF3D7F1,A892B2A07E2643C1845C99F4E687862B,D8CF30DCA6AB43F69021C95005E6BD13,D9AD12FC3BBA499DA29BDB45ADCE6D5A,FB5802AE5E284CCE8B1AEF307089595B,A5112471313A4F0199F10514E5DF2BBE,4B67D434A6DD44A69A1EAE1D74C83562,18B60CB5A6174D169BA790216E002B4D,7BCCA05C769C44E395EDA1AC27A56A03,E6EAD13FC35445AE9BD81901F0624172,6F67E7FC52C444CFA0D7B7E95F5FEDB8,158F30646EE949ABB8B637F09BC79AED,327EF8CB2F564BA99F20687CD8AA35F1,53479AE940E744B5B3624BE316062075,325EDF84AA9C4395AAD33A14F59BE6A1,E43A0CFA32F044C6B381E8771ED0DD7C,2F3F3D5938D84A67811FBF8A27162690,7EBDA22E5A664C56A56C28C3D26DC092,E70FD5E6A6B04477A2200D9C43E78A24,98C02C1EB0224902AAE5171D347AC76B,1CDFEC4B6E2140D6843D25ADB328128E,2653FE69D1DE43C8ADC3D1E20505B430,0C6AAE6CBB6842739797E8E20048E91A,D96638F06E794FA5825D23E36EFFB9D1,8EA4BA1E749B4C388AB7A8F976788D56,6A2500E55D034D7B8EB13D06878A1D9B,A0CA35EECA0F42229D8410545ACB68E3,C34B8B66DDF244B8A3A908C53EBB16F6,1FCF5E2FDCB2450F806A675AB07193A7,F788E977C5B64ED7A85169BA5236589E,E4B776F73C724DD7A5B323E0B2E841BA,08189B9A7D844CBCAFE14A7FB9B96913,B147B3EC7A8D42A4A608053D0BBDA16A,D47DAC0B366F483BAA194C5343D319C0,E279CA67D8CA43F5AEC3F4CA84214406,CCBEF4528C9A42BD9DB5DD3BF8173728,55477A2045D3473B8F4206A86698E6D2,5FAE4EEA12BD4A688A15C8E37EE3EBD7,67D855B636114782AD040B50B7228692,103BEA21E8E542D2A034A31770ADE05F,AF4BA739CCEA492B833CD43A77A33C6D,66FE8861B05B4347A044EDFF1014A288,092B255D7EC74A3FA5525FC569B3F71E,4D9E8560D45A460480F4A1149D08606E,E058BB072CFA44B2B6C100566EAADEED,319E8635613743318EA26DBD03BC882C,19F0E53F8AA44F4A8C0B61C1A747688D,2133FE47A7324CDA80EE68FF45E61E05,8FBFE61810E4454F8E1246C7981F1551,7A31597C9469404EB6F07F8DDDC6DE3E,70361055E36D43EAABBE36524BCEF26D,4F3851920A7449BA903F88A3136A7F17,87652CFFDAD949FABD8B9C568435E3EF,2D104264E8E74EA58549EE603BCD8AEA,A6D118067C8B403985AD754E3AFD075A,A67CC53B0AD04B07B9419AE42A731707,9C6267A300964551B8EB72221E0E6D33,4531AF4A7F3A422DA80ABA2B6B45E657,309E9A1B24C6496B9D79AC17C0886209,993AA85D1C7747E09823747874BCC4F3,469016B267C84C208442E2696C9D400A,1B693F0BE60F4C56A0BA89BDE1DC55B1,3BA5DBAB24F6422580F083DA3776FD08,3794C31D03A643EE928C8A5358E12853,76A2DDBEC2224AEDBF71A320A6667987,DFE5315B13BB4F8F821774FE4A49D46C,78F45D18B38048E9901DE1F0102384DC,C984287036394AF6943C8F93B78E4506,F71E03783E794EA6B72CF90DF5B7DBA5,D0B0F660DF9A4F609C00BD619EBB0F51,AD55542CD1F54C208E7F7B58EC65C008,2432C0FB102D4451908EDA04A6642190,535C96CDB35F49BB801321F522FB2B96,C853ABFC80E74DC4BB82967F029D42E2,2324EF6B39E54D17BACC2684CF4F16AA,E340A0C8A88C443BB8FAB9FCDF844FD8,6D005AF435DA48C183ACA2B0E81EDD8F,2C743FE937A9485492069A2DFD5C1503,C82D39BA61EE465E95EB5D9C16B5A5F8,975DDFA55BAD4CB9AF9B8435DD12D7A0,8D2AAA7E604C47DE81535132E0E6C48B,2644B64E7DC843C1A49EEED5C9AD8861,C4E159A41C614709867FD47F8455B218,CD18CEA3A5F6443E9B47DA2076F03C03,09868DD506E044AEB71468EA45014280,FFC21A886B7B442A8939CF67950E815A,783B64B7E16E4469BDAD56E05AF5403B,806B5D2219004E21AD2EA379FE966670,0598DB73327A4B4CBE02684086122065,16ACC38D0A22432E80DD09FF717B6224,EFB204879DDD41D396B2FB3A5E029323,C774409334DC43FDBC3FE3687D9DDE69,FF0C52506A3945EFB25591C780D8EB98,5D047A3692B840F58CBCDA2F54D8CF7D,82BBDFEC32274B72AB27A8E1D453F514,2ED7CF7C8C574B4BB9FA8AEA512D4D63,FB83A1D3A97D4CE099FC66AB24FBFFCA,B1D84FD139D84CB3AAB1A03CDFD6B579,FA91DD8960124653AE9B01E2F8655687,A64FB0CB369043F29A1C20EC1E613F8A,8280E4BDF99642E7A5FBFB6427D236FD,BFBAC410E31D4DE3B2CB6CAA31341CEA,DFCC55A6294C425F9E9A2776F0E0DC65,182152C8710A463CA2D015AB770F4193,31825820459F42EEADBA2E15A3F1D1FA,A1F5B06F460F4F67BBBC6AC3FE27AE85,DF65A343ABA543CF88B7A6DCD52380A3,D9CC311BEE7B435EA13ED5359665FA1C,A23C7BE09AA344D0BB7E8ACECCF84B9B,092895CF76EA44FABC262980D8A156D9,62CD82E1A1024DC8AB12DB0E4338674D,617419D69ADC49F0A5E84CE7807233EE,64FF896979C74E799DDE3F383812E4F1,CE80F7CD48AD494BA9C51D29CF2A8773,D31CC43D89D242EFBAB45C84ABCE1FF4,4F376722D18F42DBB0E86866B7017F50,F0D1C82A28DE4E0995FFD646E7A5A24D,D4D7E44F737644069A7C8FFE2A577E7A,DB90663FCEC343B6BDF99BB21C63C02F,6A3B7B0E57DD48CEACE2981F1C7C81ED,04FFD14E863C427B9E95FDD273059339,7A3EBF715DBB43258B29BFCBA7E8F8ED,71329097F6AD4455A6193BA551993DF2,45F69D028C46421C9B2897B1EB3EDD4E,26654E04FDD4405CBDB9334070DC2026,AB585C50B9934FEE8D6DCC141AECA3EE,2D288394D33F449F8C5BE09A23B5F97B,288B1466C1024455A5C80DE9944C275E,16303BD6F5C74355A3E6ED4DB60B8A67,469ACE6358FB4C0EA58058FA823EAFEC,0D796DFE59D0443E93A2CA46F607886E,790BA1D65CA34B72AFA6ED87355A6337,9228CFE725604EA0BF01C676B5C5E72A,BF77D03787D84C9888FCFBD012BFDA02,043D618911174C8D85F2B97407B3B652,08537956D91D40B69AE040254CAF341E,DDDD4C61896142B78A1EA29105A082AD,BDA0ECE46C39499491FD6149E787C9F4,96B08A8DB32C49E2A809E156DB592842,D3E00B67031D4A309FE917292CF1F719,77D3336DC2214AE6A7304A23FD35A805,F04CEDB8E1FC4341958071416F24AD05,2484267157304B488B71329DDB3D8421,D76C8E0696EA4C62B38DBD29ACB602E7,F3CE6131A1674567ADC67FA3FD764B7E,6B6A074DD75A415C958AC44CA5755B60,38D225ED623B4E13B78C2C917579E440,6A247D9E877C4A5689C8A90BCBD8F957,537C0C44F0C740CA917101B6413C9AB5,C851613D607F47F99AAD8516BBA438F4,1955B39FD1884AB180F1F69F45C0B1BE,43C4BA0AFB8B486B9AACBD519E403AD9,1526521C6C704155A625CF21CE913BF4,0917477F7B8B48228D2A13D8B5E5D0C7,D1331BB2694840FD8B38D5857E4D8C05,317DAAB1CF49470CA3FD565D773666DD,943596C335724B139171B9EDA473DA53,9178C2F840EB4CD9B1098A333EBFA992,B8184BF4838A4B4FA7809FDCBB25504E,AEDAF1F20FAF44FC93AB35D2DFD3E5C5,B6E2D1B581464191AD48AFF6AED9B813,C2BAA87926B14FCCB7B6C481EFAA395C,972455AB23EC47A1A2C31B53F5C06E68,8969F75D79B6402BA45B7DF1EA54435D,531F3B4C89EC4BF180B6616F94656FA1,E853EC3DE4244365BE97935652115E35,043739981A1D4C5BBACAC37926B2104C,9D1090AFC1D043B2A8086A4FFF8D31E4,8DF1BD24A1EB4F4F918E75236873A402,00FC5F98BDE047F99C062F6ABD2DCB9B,F5CA78C4CDAC45758F3D3518EB2938C5,6027B0644E5E4A238FBD6CAC1F44DDE3,15F7BFB3DA804535BDD03E216EB851B4,2CD3172D63644694A19E7BE676B63362,696A3525F40E4E01B538CF3E729CB410,68269B60854A41C48A55EC4FB363E5F3,B54CFF4B5FED44A9853F2F6FA3FFC931,11009FD31FA045C3910556DDB72C5817,86B7EAE491FF4025946652B3423A4EB5,C83B8D6D3DBA455B8C4973F68D8E2F59,FD8E0F9DA2124FCB954859AB6F48755F}'::text[])) AND (SubPlan 1))
-> BitmapAnd (cost=26613.71..26613.71 rows=12560 width=0) (actual time=77.331..77.331 rows=0 loops=1)
-> Bitmap Index Scan on m_inout_iscompletelyinvoiced (cost=0.00..1480.42 rows=79998 width=0) (actual time=6.865..6.865 rows=75598 loops=1)
Index Cond: (iscompletelyinvoiced = 'N'::bpchar)
-> Bitmap Index Scan on m_inout_bpartner (cost=0.00..25130.91 rows=364047 width=0) (actual time=69.266..69.266 rows=361499 loops=1)
Index Cond: ((c_bpartner_id)::text = '486F7C82A6C8446F84BC134EEB3B7066'::text)
SubPlan 1
-> HashAggregate (cost=3571.93..3572.65 rows=36 width=46) (actual time=0.179..0.179 rows=1 loops=2362)
Filter: (((l.movementqty >= 0::numeric) AND (l.movementqty > sum(COALESCE(CASE WHEN ((i.docstatus)::text = 'CO'::text) THEN il.qtyinvoiced ELSE 0::numeric END, 0::numeric)))) OR ((l.movementqty < 0::numeric) AND (l.movementqty < sum(COALESCE(CASE WHEN ((i.docstatus)::text = 'CO'::text) THEN il.qtyinvoiced ELSE 0::numeric END, 0::numeric)))))
Rows Removed by Filter: 0
-> Nested Loop Left Join (cost=25.75..3571.39 rows=36 width=46) (actual time=0.080..0.172 rows=3 loops=2362)
-> Nested Loop Left Join (cost=25.32..3296.99 rows=36 width=76) (actual time=0.078..0.168 rows=3 loops=2362)
-> Hash Left Join (cost=24.77..2987.84 rows=36 width=38) (actual time=0.062..0.122 rows=3 loops=2362)
Hash Cond: ((o_1.m_pricelist_id)::text = (pl.m_pricelist_id)::text)
Filter: ((l.c_orderline_id IS NULL) OR (pl.istaxincluded = 'Y'::bpchar))
-> Nested Loop Left Join (cost=1.68..2962.40 rows=145 width=104) (actual time=0.060..0.118 rows=3 loops=2362)
-> Nested Loop Left Join (cost=1.12..1836.24 rows=145 width=104) (actual time=0.042..0.078 rows=3 loops=2362)
-> Index Scan using m_inoutline_inout on m_inoutline l (cost=0.56..591.06 rows=145 width=71) (actual time=0.023..0.025 rows=3 loops=2362)
Index Cond: ((m_inout_id)::text = (s.m_inout_id)::text)
-> Index Scan using c_orderline_key on c_orderline ol_1 (cost=0.56..8.58 rows=1 width=66) (actual time=0.016..0.016 rows=1 loops=7045)
Index Cond: ((l.c_orderline_id)::text = (c_orderline_id)::text)
-> Index Scan using c_order_key on c_order o_1 (cost=0.56..7.76 rows=1 width=66) (actual time=0.011..0.012 rows=1 loops=7045)
Index Cond: ((ol_1.c_order_id)::text = (c_order_id)::text)
-> Hash (cost=18.04..18.04 rows=404 width=35) (actual time=0.280..0.280 rows=404 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 27kB
-> Seq Scan on m_pricelist pl (cost=0.00..18.04 rows=404 width=35) (actual time=0.005..0.159 rows=404 loops=1)
-> Index Scan using c_invoiceline_inoutline on c_invoiceline il (cost=0.56..8.58 rows=1 width=71) (actual time=0.014..0.014 rows=0 loops=7045)
Index Cond: ((l.m_inoutline_id)::text = (m_inoutline_id)::text)
-> Index Scan using c_invoice_key on c_invoice i (cost=0.42..7.61 rows=1 width=36) (actual time=0.001..0.001 rows=0 loops=7153)
Index Cond: ((il.c_invoice_id)::text = (c_invoice_id)::text)
-> Nested Loop (cost=0.99..344033.60 rows=9564523 width=33) (actual time=0.011..0.011 rows=0 loops=2362)
-> Index Scan using c_order_key on c_order o (cost=0.56..8.09 rows=1 width=33) (actual time=0.010..0.010 rows=0 loops=2362)
Index Cond: ((c_order_id)::text = (s.c_order_id)::text)
Filter: ((((invoicerule)::text = 'O'::text) AND (isdelivered = 'N'::bpchar)) OR ((invoicerule)::text = 'N'::text))
Rows Removed by Filter: 1
-> Index Only Scan using em_cdcx_quotline_idx on c_orderline ol (cost=0.43..248380.28 rows=9564523 width=0) (never executed)
Heap Fetches: 0
Total runtime: 1571.662 ms
*******************************
selectFromPOCombo method query:-
*******************************
SELECT o.C_ORDER_ID AS ID,
Ad_Column_Identifier(to_char('C_Order'), to_char(o.c_order_id), to_char('en_US')) AS NAME
FROM C_ORDER o
JOIN m_pricelist pl ON o.m_pricelist_id = pl.m_pricelist_id
WHERE o.IsSOTrx='N'
AND o.DocStatus IN ('CL',
'CO')
AND o.AD_Client_ID IN ('0',
'8B72EA2C5B444DE291849E37F2F86DBA')
AND o.AD_Org_ID IN ( '0', '306D3B3010FB47C8830A3CD6544CB71D',
'A25CF246A7B94A4A92B0C0D74878D227',
'CBC7D0B4DEB04192ABA391687EAE0F61',
'3F52F6C378274F8EA1A9A1A10D15E21E',
'C14CFAB09B594263AB5C99A82937E427',
'E453C89517DD4FB3A2EBB9EF79808E3A',
'E3ADD08E7A344BC4AA0E5271A00EE1AB',
'48C21BE2F1A449A8AD397A7D1B3F2C18',
'318A3152361C46959E07EC1393D1C7CE',
'E3353FB57805410D9515EFA23737C399',
'AB40EE591DBE44F093E4C5B606D354C6',
'A31788F217B448728321DDB7800D1808',
'3CB045196B7547DFAE80DC60193B687A',
'362AAC83D0D94AB5B802E2FDDA49A8E0',
'5F7B6E84D15843E69C4ED7D97444D478',
'40C5CBF3762A4BDA85058E1D837E03E4',
'8BD961208E0244D99F31700FFAC12341',
'6D3322D0CEFE40FBB5ADCE995C9A5E18',
'D2FF042B470147AB81BC7B993D63214C',
'B31B3BFBBE154ACB93897A42C9FF351C',
'2DE44FC9B33847FEB69C2908E1FBC1C2',
'E7F4AC1093684F15B5954A5818076653',
'3A1097E45C4243F6BBE926EA3D947E3F',
'5F0B6579C951489A936A683A426A132E',
'9FC6900EC6D04B55B3F831FA09121E32',
'D46CCA95EB5542A5973BAEEF312F6A0D',
'EC9580A5DE2F4AADA9ECC42D34702571',
'25E8B7AA299A492D9EF6B2B99B864419',
'316DC99A97B844CDBE9E20003A16C0F3',
'5F49108E9AA24990A0EBC198DF40CE54',
'5305CF0416744873BB2DF46386354A31',
'9A3DA17921AD4C52A79C2359B0BBC981',
'BADC1A86EB20423FA958DE0B65CC381F',
'A8B01CD45FDA490AA2FBF2A857249345',
'63022951ABB74A86B790E95F52E40F58',
'FAF808E5C3F349248230456BFC11C6B8',
'53D2871ECE304BB09604AF4D0FF3D7F1',
'A892B2A07E2643C1845C99F4E687862B',
'D8CF30DCA6AB43F69021C95005E6BD13',
'D9AD12FC3BBA499DA29BDB45ADCE6D5A',
'FB5802AE5E284CCE8B1AEF307089595B',
'A5112471313A4F0199F10514E5DF2BBE',
'4B67D434A6DD44A69A1EAE1D74C83562',
'18B60CB5A6174D169BA790216E002B4D',
'7BCCA05C769C44E395EDA1AC27A56A03',
'E6EAD13FC35445AE9BD81901F0624172',
'6F67E7FC52C444CFA0D7B7E95F5FEDB8',
'158F30646EE949ABB8B637F09BC79AED',
'327EF8CB2F564BA99F20687CD8AA35F1',
'53479AE940E744B5B3624BE316062075',
'325EDF84AA9C4395AAD33A14F59BE6A1',
'E43A0CFA32F044C6B381E8771ED0DD7C',
'2F3F3D5938D84A67811FBF8A27162690',
'7EBDA22E5A664C56A56C28C3D26DC092',
'E70FD5E6A6B04477A2200D9C43E78A24',
'98C02C1EB0224902AAE5171D347AC76B',
'1CDFEC4B6E2140D6843D25ADB328128E',
'2653FE69D1DE43C8ADC3D1E20505B430',
'0C6AAE6CBB6842739797E8E20048E91A',
'D96638F06E794FA5825D23E36EFFB9D1',
'8EA4BA1E749B4C388AB7A8F976788D56',
'6A2500E55D034D7B8EB13D06878A1D9B',
'A0CA35EECA0F42229D8410545ACB68E3',
'C34B8B66DDF244B8A3A908C53EBB16F6',
'1FCF5E2FDCB2450F806A675AB07193A7',
'F788E977C5B64ED7A85169BA5236589E',
'E4B776F73C724DD7A5B323E0B2E841BA',
'08189B9A7D844CBCAFE14A7FB9B96913',
'B147B3EC7A8D42A4A608053D0BBDA16A',
'D47DAC0B366F483BAA194C5343D319C0',
'E279CA67D8CA43F5AEC3F4CA84214406',
'CCBEF4528C9A42BD9DB5DD3BF8173728',
'55477A2045D3473B8F4206A86698E6D2',
'5FAE4EEA12BD4A688A15C8E37EE3EBD7',
'67D855B636114782AD040B50B7228692',
'103BEA21E8E542D2A034A31770ADE05F',
'AF4BA739CCEA492B833CD43A77A33C6D',
'66FE8861B05B4347A044EDFF1014A288',
'092B255D7EC74A3FA5525FC569B3F71E',
'4D9E8560D45A460480F4A1149D08606E',
'E058BB072CFA44B2B6C100566EAADEED',
'319E8635613743318EA26DBD03BC882C',
'19F0E53F8AA44F4A8C0B61C1A747688D',
'2133FE47A7324CDA80EE68FF45E61E05',
'8FBFE61810E4454F8E1246C7981F1551',
'7A31597C9469404EB6F07F8DDDC6DE3E',
'70361055E36D43EAABBE36524BCEF26D',
'4F3851920A7449BA903F88A3136A7F17',
'87652CFFDAD949FABD8B9C568435E3EF',
'2D104264E8E74EA58549EE603BCD8AEA',
'A6D118067C8B403985AD754E3AFD075A',
'A67CC53B0AD04B07B9419AE42A731707',
'9C6267A300964551B8EB72221E0E6D33',
'4531AF4A7F3A422DA80ABA2B6B45E657',
'309E9A1B24C6496B9D79AC17C0886209',
'993AA85D1C7747E09823747874BCC4F3',
'469016B267C84C208442E2696C9D400A',
'1B693F0BE60F4C56A0BA89BDE1DC55B1',
'3BA5DBAB24F6422580F083DA3776FD08',
'3794C31D03A643EE928C8A5358E12853',
'76A2DDBEC2224AEDBF71A320A6667987',
'DFE5315B13BB4F8F821774FE4A49D46C',
'78F45D18B38048E9901DE1F0102384DC',
'C984287036394AF6943C8F93B78E4506',
'F71E03783E794EA6B72CF90DF5B7DBA5',
'D0B0F660DF9A4F609C00BD619EBB0F51',
'AD55542CD1F54C208E7F7B58EC65C008',
'2432C0FB102D4451908EDA04A6642190',
'535C96CDB35F49BB801321F522FB2B96',
'C853ABFC80E74DC4BB82967F029D42E2',
'2324EF6B39E54D17BACC2684CF4F16AA',
'E340A0C8A88C443BB8FAB9FCDF844FD8',
'6D005AF435DA48C183ACA2B0E81EDD8F',
'2C743FE937A9485492069A2DFD5C1503',
'C82D39BA61EE465E95EB5D9C16B5A5F8',
'975DDFA55BAD4CB9AF9B8435DD12D7A0',
'8D2AAA7E604C47DE81535132E0E6C48B',
'2644B64E7DC843C1A49EEED5C9AD8861',
'C4E159A41C614709867FD47F8455B218',
'CD18CEA3A5F6443E9B47DA2076F03C03',
'09868DD506E044AEB71468EA45014280',
'FFC21A886B7B442A8939CF67950E815A',
'783B64B7E16E4469BDAD56E05AF5403B',
'806B5D2219004E21AD2EA379FE966670',
'0598DB73327A4B4CBE02684086122065',
'16ACC38D0A22432E80DD09FF717B6224',
'EFB204879DDD41D396B2FB3A5E029323',
'C774409334DC43FDBC3FE3687D9DDE69',
'FF0C52506A3945EFB25591C780D8EB98',
'5D047A3692B840F58CBCDA2F54D8CF7D',
'82BBDFEC32274B72AB27A8E1D453F514',
'2ED7CF7C8C574B4BB9FA8AEA512D4D63',
'FB83A1D3A97D4CE099FC66AB24FBFFCA',
'B1D84FD139D84CB3AAB1A03CDFD6B579',
'FA91DD8960124653AE9B01E2F8655687',
'A64FB0CB369043F29A1C20EC1E613F8A',
'8280E4BDF99642E7A5FBFB6427D236FD',
'BFBAC410E31D4DE3B2CB6CAA31341CEA',
'DFCC55A6294C425F9E9A2776F0E0DC65',
'182152C8710A463CA2D015AB770F4193',
'31825820459F42EEADBA2E15A3F1D1FA',
'A1F5B06F460F4F67BBBC6AC3FE27AE85',
'DF65A343ABA543CF88B7A6DCD52380A3',
'D9CC311BEE7B435EA13ED5359665FA1C',
'A23C7BE09AA344D0BB7E8ACECCF84B9B',
'092895CF76EA44FABC262980D8A156D9',
'62CD82E1A1024DC8AB12DB0E4338674D',
'617419D69ADC49F0A5E84CE7807233EE',
'64FF896979C74E799DDE3F383812E4F1',
'CE80F7CD48AD494BA9C51D29CF2A8773',
'D31CC43D89D242EFBAB45C84ABCE1FF4',
'4F376722D18F42DBB0E86866B7017F50',
'F0D1C82A28DE4E0995FFD646E7A5A24D',
'D4D7E44F737644069A7C8FFE2A577E7A',
'DB90663FCEC343B6BDF99BB21C63C02F',
'6A3B7B0E57DD48CEACE2981F1C7C81ED',
'04FFD14E863C427B9E95FDD273059339',
'7A3EBF715DBB43258B29BFCBA7E8F8ED',
'71329097F6AD4455A6193BA551993DF2',
'45F69D028C46421C9B2897B1EB3EDD4E',
'26654E04FDD4405CBDB9334070DC2026',
'AB585C50B9934FEE8D6DCC141AECA3EE',
'2D288394D33F449F8C5BE09A23B5F97B',
'288B1466C1024455A5C80DE9944C275E',
'16303BD6F5C74355A3E6ED4DB60B8A67',
'469ACE6358FB4C0EA58058FA823EAFEC',
'0D796DFE59D0443E93A2CA46F607886E',
'790BA1D65CA34B72AFA6ED87355A6337',
'9228CFE725604EA0BF01C676B5C5E72A',
'BF77D03787D84C9888FCFBD012BFDA02',
'043D618911174C8D85F2B97407B3B652',
'08537956D91D40B69AE040254CAF341E',
'DDDD4C61896142B78A1EA29105A082AD',
'BDA0ECE46C39499491FD6149E787C9F4',
'96B08A8DB32C49E2A809E156DB592842',
'D3E00B67031D4A309FE917292CF1F719',
'77D3336DC2214AE6A7304A23FD35A805',
'F04CEDB8E1FC4341958071416F24AD05',
'2484267157304B488B71329DDB3D8421',
'D76C8E0696EA4C62B38DBD29ACB602E7',
'F3CE6131A1674567ADC67FA3FD764B7E',
'6B6A074DD75A415C958AC44CA5755B60',
'38D225ED623B4E13B78C2C917579E440',
'6A247D9E877C4A5689C8A90BCBD8F957',
'537C0C44F0C740CA917101B6413C9AB5',
'C851613D607F47F99AAD8516BBA438F4',
'1955B39FD1884AB180F1F69F45C0B1BE',
'43C4BA0AFB8B486B9AACBD519E403AD9',
'1526521C6C704155A625CF21CE913BF4',
'0917477F7B8B48228D2A13D8B5E5D0C7',
'D1331BB2694840FD8B38D5857E4D8C05',
'317DAAB1CF49470CA3FD565D773666DD',
'943596C335724B139171B9EDA473DA53',
'9178C2F840EB4CD9B1098A333EBFA992',
'B8184BF4838A4B4FA7809FDCBB25504E',
'AEDAF1F20FAF44FC93AB35D2DFD3E5C5',
'B6E2D1B581464191AD48AFF6AED9B813',
'C2BAA87926B14FCCB7B6C481EFAA395C',
'972455AB23EC47A1A2C31B53F5C06E68',
'8969F75D79B6402BA45B7DF1EA54435D',
'531F3B4C89EC4BF180B6616F94656FA1',
'E853EC3DE4244365BE97935652115E35',
'043739981A1D4C5BBACAC37926B2104C',
'9D1090AFC1D043B2A8086A4FFF8D31E4',
'8DF1BD24A1EB4F4F918E75236873A402',
'00FC5F98BDE047F99C062F6ABD2DCB9B',
'F5CA78C4CDAC45758F3D3518EB2938C5',
'6027B0644E5E4A238FBD6CAC1F44DDE3',
'15F7BFB3DA804535BDD03E216EB851B4',
'2CD3172D63644694A19E7BE676B63362',
'696A3525F40E4E01B538CF3E729CB410',
'68269B60854A41C48A55EC4FB363E5F3',
'B54CFF4B5FED44A9853F2F6FA3FFC931',
'11009FD31FA045C3910556DDB72C5817',
'86B7EAE491FF4025946652B3423A4EB5',
'C83B8D6D3DBA455B8C4973F68D8E2F59',
'FD8E0F9DA2124FCB954859AB6F48755F' )
AND o.C_BPartner_ID = 'F20F58A13DA54628BAFD90F61AA1F3F1'
AND pl.istaxincluded = 'N'
AND o.InvoiceRule <> 'N'
AND EXISTS
(SELECT 1
FROM C_ORDERLINE l
LEFT JOIN M_MATCHPO m ON l.C_OrderLine_ID=m.C_OrderLine_ID
AND m.C_InvoiceLine_ID IS NOT NULL
WHERE l.C_ORDER_ID = o.C_ORDER_ID
GROUP BY l.QtyOrdered,
l.C_OrderLine_ID
HAVING (l.QtyOrdered-SUM(COALESCE(m.Qty,0))) <> 0)
ORDER BY NAME;
Sort (cost=554840.37..554840.37 rows=2 width=33) (actual time=3909.923..3910.021 rows=696 loops=1)
Sort Key: (ad_column_identifier('C_Order'::character varying, to_char(o.c_order_id), 'en_US'::character varying))
Sort Method: quicksort Memory: 122kB
-> Hash Join (cost=89933.29..554840.36 rows=2 width=33) (actual time=1516.120..3907.337 rows=696 loops=1)
Hash Cond: ((o.m_pricelist_id)::text = (pl.m_pricelist_id)::text)
-> Bitmap Heap Scan on c_order o (cost=89910.41..554816.45 rows=3 width=66) (actual time=1515.099..3455.171 rows=696 loops=1)
Recheck Cond: (((c_bpartner_id)::text = 'F20F58A13DA54628BAFD90F61AA1F3F1'::text) AND ((ad_client_id)::text = ANY ('{0,8B72EA2C5B444DE291849E37F2F86DBA}'::text[])) AND ((ad_org_id)::text = ANY ('{0,306D3B3010FB47C8830A3CD6544CB71D,A25CF246A7B94A4A92B0C0D74878D227,CBC7D0B4DEB04192ABA391687EAE0F61,3F52F6C378274F8EA1A9A1A10D15E21E,C14CFAB09B594263AB5C99A82937E427,E453C89517DD4FB3A2EBB9EF79808E3A,E3ADD08E7A344BC4AA0E5271A00EE1AB,48C21BE2F1A449A8AD397A7D1B3F2C18,318A3152361C46959E07EC1393D1C7CE,E3353FB57805410D9515EFA23737C399,AB40EE591DBE44F093E4C5B606D354C6,A31788F217B448728321DDB7800D1808,3CB045196B7547DFAE80DC60193B687A,362AAC83D0D94AB5B802E2FDDA49A8E0,5F7B6E84D15843E69C4ED7D97444D478,40C5CBF3762A4BDA85058E1D837E03E4,8BD961208E0244D99F31700FFAC12341,6D3322D0CEFE40FBB5ADCE995C9A5E18,D2FF042B470147AB81BC7B993D63214C,B31B3BFBBE154ACB93897A42C9FF351C,2DE44FC9B33847FEB69C2908E1FBC1C2,E7F4AC1093684F15B5954A5818076653,3A1097E45C4243F6BBE926EA3D947E3F,5F0B6579C951489A936A683A426A132E,9FC6900EC6D04B55B3F831FA09121E32,D46CCA95EB5542A5973BAEEF312F6A0D,EC9580A5DE2F4AADA9ECC42D34702571,25E8B7AA299A492D9EF6B2B99B864419,316DC99A97B844CDBE9E20003A16C0F3,5F49108E9AA24990A0EBC198DF40CE54,5305CF0416744873BB2DF46386354A31,9A3DA17921AD4C52A79C2359B0BBC981,BADC1A86EB20423FA958DE0B65CC381F,A8B01CD45FDA490AA2FBF2A857249345,63022951ABB74A86B790E95F52E40F58,FAF808E5C3F349248230456BFC11C6B8,53D2871ECE304BB09604AF4D0FF3D7F1,A892B2A07E2643C1845C99F4E687862B,D8CF30DCA6AB43F69021C95005E6BD13,D9AD12FC3BBA499DA29BDB45ADCE6D5A,FB5802AE5E284CCE8B1AEF307089595B,A5112471313A4F0199F10514E5DF2BBE,4B67D434A6DD44A69A1EAE1D74C83562,18B60CB5A6174D169BA790216E002B4D,7BCCA05C769C44E395EDA1AC27A56A03,E6EAD13FC35445AE9BD81901F0624172,6F67E7FC52C444CFA0D7B7E95F5FEDB8,158F30646EE949ABB8B637F09BC79AED,327EF8CB2F564BA99F20687CD8AA35F1,53479AE940E744B5B3624BE316062075,325EDF84AA9C4395AAD33A14F59BE6A1,E43A0CFA32F044C6B381E8771ED0DD7C,2F3F3D5938D84A67811FBF8A27162690,7EBDA22E5A664C56A56C28C3D26DC092,E70FD5E6A6B04477A2200D9C43E78A24,98C02C1EB0224902AAE5171D347AC76B,1CDFEC4B6E2140D6843D25ADB328128E,2653FE69D1DE43C8ADC3D1E20505B430,0C6AAE6CBB6842739797E8E20048E91A,D96638F06E794FA5825D23E36EFFB9D1,8EA4BA1E749B4C388AB7A8F976788D56,6A2500E55D034D7B8EB13D06878A1D9B,A0CA35EECA0F42229D8410545ACB68E3,C34B8B66DDF244B8A3A908C53EBB16F6,1FCF5E2FDCB2450F806A675AB07193A7,F788E977C5B64ED7A85169BA5236589E,E4B776F73C724DD7A5B323E0B2E841BA,08189B9A7D844CBCAFE14A7FB9B96913,B147B3EC7A8D42A4A608053D0BBDA16A,D47DAC0B366F483BAA194C5343D319C0,E279CA67D8CA43F5AEC3F4CA84214406,CCBEF4528C9A42BD9DB5DD3BF8173728,55477A2045D3473B8F4206A86698E6D2,5FAE4EEA12BD4A688A15C8E37EE3EBD7,67D855B636114782AD040B50B7228692,103BEA21E8E542D2A034A31770ADE05F,AF4BA739CCEA492B833CD43A77A33C6D,66FE8861B05B4347A044EDFF1014A288,092B255D7EC74A3FA5525FC569B3F71E,4D9E8560D45A460480F4A1149D08606E,E058BB072CFA44B2B6C100566EAADEED,319E8635613743318EA26DBD03BC882C,19F0E53F8AA44F4A8C0B61C1A747688D,2133FE47A7324CDA80EE68FF45E61E05,8FBFE61810E4454F8E1246C7981F1551,7A31597C9469404EB6F07F8DDDC6DE3E,70361055E36D43EAABBE36524BCEF26D,4F3851920A7449BA903F88A3136A7F17,87652CFFDAD949FABD8B9C568435E3EF,2D104264E8E74EA58549EE603BCD8AEA,A6D118067C8B403985AD754E3AFD075A,A67CC53B0AD04B07B9419AE42A731707,9C6267A300964551B8EB72221E0E6D33,4531AF4A7F3A422DA80ABA2B6B45E657,309E9A1B24C6496B9D79AC17C0886209,993AA85D1C7747E09823747874BCC4F3,469016B267C84C208442E2696C9D400A,1B693F0BE60F4C56A0BA89BDE1DC55B1,3BA5DBAB24F6422580F083DA3776FD08,3794C31D03A643EE928C8A5358E12853,76A2DDBEC2224AEDBF71A320A6667987,DFE5315B13BB4F8F821774FE4A49D46C,78F45D18B38048E9901DE1F0102384DC,C984287036394AF6943C8F93B78E4506,F71E03783E794EA6B72CF90DF5B7DBA5,D0B0F660DF9A4F609C00BD619EBB0F51,AD55542CD1F54C208E7F7B58EC65C008,2432C0FB102D4451908EDA04A6642190,535C96CDB35F49BB801321F522FB2B96,C853ABFC80E74DC4BB82967F029D42E2,2324EF6B39E54D17BACC2684CF4F16AA,E340A0C8A88C443BB8FAB9FCDF844FD8,6D005AF435DA48C183ACA2B0E81EDD8F,2C743FE937A9485492069A2DFD5C1503,C82D39BA61EE465E95EB5D9C16B5A5F8,975DDFA55BAD4CB9AF9B8435DD12D7A0,8D2AAA7E604C47DE81535132E0E6C48B,2644B64E7DC843C1A49EEED5C9AD8861,C4E159A41C614709867FD47F8455B218,CD18CEA3A5F6443E9B47DA2076F03C03,09868DD506E044AEB71468EA45014280,FFC21A886B7B442A8939CF67950E815A,783B64B7E16E4469BDAD56E05AF5403B,806B5D2219004E21AD2EA379FE966670,0598DB73327A4B4CBE02684086122065,16ACC38D0A22432E80DD09FF717B6224,EFB204879DDD41D396B2FB3A5E029323,C774409334DC43FDBC3FE3687D9DDE69,FF0C52506A3945EFB25591C780D8EB98,5D047A3692B840F58CBCDA2F54D8CF7D,82BBDFEC32274B72AB27A8E1D453F514,2ED7CF7C8C574B4BB9FA8AEA512D4D63,FB83A1D3A97D4CE099FC66AB24FBFFCA,B1D84FD139D84CB3AAB1A03CDFD6B579,FA91DD8960124653AE9B01E2F8655687,A64FB0CB369043F29A1C20EC1E613F8A,8280E4BDF99642E7A5FBFB6427D236FD,BFBAC410E31D4DE3B2CB6CAA31341CEA,DFCC55A6294C425F9E9A2776F0E0DC65,182152C8710A463CA2D015AB770F4193,31825820459F42EEADBA2E15A3F1D1FA,A1F5B06F460F4F67BBBC6AC3FE27AE85,DF65A343ABA543CF88B7A6DCD52380A3,D9CC311BEE7B435EA13ED5359665FA1C,A23C7BE09AA344D0BB7E8ACECCF84B9B,092895CF76EA44FABC262980D8A156D9,62CD82E1A1024DC8AB12DB0E4338674D,617419D69ADC49F0A5E84CE7807233EE,64FF896979C74E799DDE3F383812E4F1,CE80F7CD48AD494BA9C51D29CF2A8773,D31CC43D89D242EFBAB45C84ABCE1FF4,4F376722D18F42DBB0E86866B7017F50,F0D1C82A28DE4E0995FFD646E7A5A24D,D4D7E44F737644069A7C8FFE2A577E7A,DB90663FCEC343B6BDF99BB21C63C02F,6A3B7B0E57DD48CEACE2981F1C7C81ED,04FFD14E863C427B9E95FDD273059339,7A3EBF715DBB43258B29BFCBA7E8F8ED,71329097F6AD4455A6193BA551993DF2,45F69D028C46421C9B2897B1EB3EDD4E,26654E04FDD4405CBDB9334070DC2026,AB585C50B9934FEE8D6DCC141AECA3EE,2D288394D33F449F8C5BE09A23B5F97B,288B1466C1024455A5C80DE9944C275E,16303BD6F5C74355A3E6ED4DB60B8A67,469ACE6358FB4C0EA58058FA823EAFEC,0D796DFE59D0443E93A2CA46F607886E,790BA1D65CA34B72AFA6ED87355A6337,9228CFE725604EA0BF01C676B5C5E72A,BF77D03787D84C9888FCFBD012BFDA02,043D618911174C8D85F2B97407B3B652,08537956D91D40B69AE040254CAF341E,DDDD4C61896142B78A1EA29105A082AD,BDA0ECE46C39499491FD6149E787C9F4,96B08A8DB32C49E2A809E156DB592842,D3E00B67031D4A309FE917292CF1F719,77D3336DC2214AE6A7304A23FD35A805,F04CEDB8E1FC4341958071416F24AD05,2484267157304B488B71329DDB3D8421,D76C8E0696EA4C62B38DBD29ACB602E7,F3CE6131A1674567ADC67FA3FD764B7E,6B6A074DD75A415C958AC44CA5755B60,38D225ED623B4E13B78C2C917579E440,6A247D9E877C4A5689C8A90BCBD8F957,537C0C44F0C740CA917101B6413C9AB5,C851613D607F47F99AAD8516BBA438F4,1955B39FD1884AB180F1F69F45C0B1BE,43C4BA0AFB8B486B9AACBD519E403AD9,1526521C6C704155A625CF21CE913BF4,0917477F7B8B48228D2A13D8B5E5D0C7,D1331BB2694840FD8B38D5857E4D8C05,317DAAB1CF49470CA3FD565D773666DD,943596C335724B139171B9EDA473DA53,9178C2F840EB4CD9B1098A333EBFA992,B8184BF4838A4B4FA7809FDCBB25504E,AEDAF1F20FAF44FC93AB35D2DFD3E5C5,B6E2D1B581464191AD48AFF6AED9B813,C2BAA87926B14FCCB7B6C481EFAA395C,972455AB23EC47A1A2C31B53F5C06E68,8969F75D79B6402BA45B7DF1EA54435D,531F3B4C89EC4BF180B6616F94656FA1,E853EC3DE4244365BE97935652115E35,043739981A1D4C5BBACAC37926B2104C,9D1090AFC1D043B2A8086A4FFF8D31E4,8DF1BD24A1EB4F4F918E75236873A402,00FC5F98BDE047F99C062F6ABD2DCB9B,F5CA78C4CDAC45758F3D3518EB2938C5,6027B0644E5E4A238FBD6CAC1F44DDE3,15F7BFB3DA804535BDD03E216EB851B4,2CD3172D63644694A19E7BE676B63362,696A3525F40E4E01B538CF3E729CB410,68269B60854A41C48A55EC4FB363E5F3,B54CFF4B5FED44A9853F2F6FA3FFC931,11009FD31FA045C3910556DDB72C5817,86B7EAE491FF4025946652B3423A4EB5,C83B8D6D3DBA455B8C4973F68D8E2F59,FD8E0F9DA2124FCB954859AB6F48755F}'::text[])))
Filter: (((docstatus)::text = ANY ('{CL,CO}'::text[])) AND ((invoicerule)::text <> 'N'::text) AND (issotrx = 'N'::bpchar) AND (SubPlan 1))
Rows Removed by Filter: 434
-> BitmapAnd (cost=89910.41..89910.41 rows=306 width=0) (actual time=1514.338..1514.338 rows=0 loops=1)
-> Bitmap Index Scan on c_order_bpartner (cost=0.00..19.87 rows=442 width=0) (actual time=0.192..0.192 rows=1130 loops=1)
Index Cond: ((c_bpartner_id)::text = 'F20F58A13DA54628BAFD90F61AA1F3F1'::text)
-> Bitmap Index Scan on c_order_client_org_date_docno (cost=0.00..89890.29 rows=1608257 width=0) (actual time=1514.088..1514.088 rows=2325873 loops=1)
Index Cond: (((ad_client_id)::text = ANY ('{0,8B72EA2C5B444DE291849E37F2F86DBA}'::text[])) AND ((ad_org_id)::text = ANY ('{0,306D3B3010FB47C8830A3CD6544CB71D,A25CF246A7B94A4A92B0C0D74878D227,CBC7D0B4DEB04192ABA391687EAE0F61,3F52F6C378274F8EA1A9A1A10D15E21E,C14CFAB09B594263AB5C99A82937E427,E453C89517DD4FB3A2EBB9EF79808E3A,E3ADD08E7A344BC4AA0E5271A00EE1AB,48C21BE2F1A449A8AD397A7D1B3F2C18,318A3152361C46959E07EC1393D1C7CE,E3353FB57805410D9515EFA23737C399,AB40EE591DBE44F093E4C5B606D354C6,A31788F217B448728321DDB7800D1808,3CB045196B7547DFAE80DC60193B687A,362AAC83D0D94AB5B802E2FDDA49A8E0,5F7B6E84D15843E69C4ED7D97444D478,40C5CBF3762A4BDA85058E1D837E03E4,8BD961208E0244D99F31700FFAC12341,6D3322D0CEFE40FBB5ADCE995C9A5E18,D2FF042B470147AB81BC7B993D63214C,B31B3BFBBE154ACB93897A42C9FF351C,2DE44FC9B33847FEB69C2908E1FBC1C2,E7F4AC1093684F15B5954A5818076653,3A1097E45C4243F6BBE926EA3D947E3F,5F0B6579C951489A936A683A426A132E,9FC6900EC6D04B55B3F831FA09121E32,D46CCA95EB5542A5973BAEEF312F6A0D,EC9580A5DE2F4AADA9ECC42D34702571,25E8B7AA299A492D9EF6B2B99B864419,316DC99A97B844CDBE9E20003A16C0F3,5F49108E9AA24990A0EBC198DF40CE54,5305CF0416744873BB2DF46386354A31,9A3DA17921AD4C52A79C2359B0BBC981,BADC1A86EB20423FA958DE0B65CC381F,A8B01CD45FDA490AA2FBF2A857249345,63022951ABB74A86B790E95F52E40F58,FAF808E5C3F349248230456BFC11C6B8,53D2871ECE304BB09604AF4D0FF3D7F1,A892B2A07E2643C1845C99F4E687862B,D8CF30DCA6AB43F69021C95005E6BD13,D9AD12FC3BBA499DA29BDB45ADCE6D5A,FB5802AE5E284CCE8B1AEF307089595B,A5112471313A4F0199F10514E5DF2BBE,4B67D434A6DD44A69A1EAE1D74C83562,18B60CB5A6174D169BA790216E002B4D,7BCCA05C769C44E395EDA1AC27A56A03,E6EAD13FC35445AE9BD81901F0624172,6F67E7FC52C444CFA0D7B7E95F5FEDB8,158F30646EE949ABB8B637F09BC79AED,327EF8CB2F564BA99F20687CD8AA35F1,53479AE940E744B5B3624BE316062075,325EDF84AA9C4395AAD33A14F59BE6A1,E43A0CFA32F044C6B381E8771ED0DD7C,2F3F3D5938D84A67811FBF8A27162690,7EBDA22E5A664C56A56C28C3D26DC092,E70FD5E6A6B04477A2200D9C43E78A24,98C02C1EB0224902AAE5171D347AC76B,1CDFEC4B6E2140D6843D25ADB328128E,2653FE69D1DE43C8ADC3D1E20505B430,0C6AAE6CBB6842739797E8E20048E91A,D96638F06E794FA5825D23E36EFFB9D1,8EA4BA1E749B4C388AB7A8F976788D56,6A2500E55D034D7B8EB13D06878A1D9B,A0CA35EECA0F42229D8410545ACB68E3,C34B8B66DDF244B8A3A908C53EBB16F6,1FCF5E2FDCB2450F806A675AB07193A7,F788E977C5B64ED7A85169BA5236589E,E4B776F73C724DD7A5B323E0B2E841BA,08189B9A7D844CBCAFE14A7FB9B96913,B147B3EC7A8D42A4A608053D0BBDA16A,D47DAC0B366F483BAA194C5343D319C0,E279CA67D8CA43F5AEC3F4CA84214406,CCBEF4528C9A42BD9DB5DD3BF8173728,55477A2045D3473B8F4206A86698E6D2,5FAE4EEA12BD4A688A15C8E37EE3EBD7,67D855B636114782AD040B50B7228692,103BEA21E8E542D2A034A31770ADE05F,AF4BA739CCEA492B833CD43A77A33C6D,66FE8861B05B4347A044EDFF1014A288,092B255D7EC74A3FA5525FC569B3F71E,4D9E8560D45A460480F4A1149D08606E,E058BB072CFA44B2B6C100566EAADEED,319E8635613743318EA26DBD03BC882C,19F0E53F8AA44F4A8C0B61C1A747688D,2133FE47A7324CDA80EE68FF45E61E05,8FBFE61810E4454F8E1246C7981F1551,7A31597C9469404EB6F07F8DDDC6DE3E,70361055E36D43EAABBE36524BCEF26D,4F3851920A7449BA903F88A3136A7F17,87652CFFDAD949FABD8B9C568435E3EF,2D104264E8E74EA58549EE603BCD8AEA,A6D118067C8B403985AD754E3AFD075A,A67CC53B0AD04B07B9419AE42A731707,9C6267A300964551B8EB72221E0E6D33,4531AF4A7F3A422DA80ABA2B6B45E657,309E9A1B24C6496B9D79AC17C0886209,993AA85D1C7747E09823747874BCC4F3,469016B267C84C208442E2696C9D400A,1B693F0BE60F4C56A0BA89BDE1DC55B1,3BA5DBAB24F6422580F083DA3776FD08,3794C31D03A643EE928C8A5358E12853,76A2DDBEC2224AEDBF71A320A6667987,DFE5315B13BB4F8F821774FE4A49D46C,78F45D18B38048E9901DE1F0102384DC,C984287036394AF6943C8F93B78E4506,F71E03783E794EA6B72CF90DF5B7DBA5,D0B0F660DF9A4F609C00BD619EBB0F51,AD55542CD1F54C208E7F7B58EC65C008,2432C0FB102D4451908EDA04A6642190,535C96CDB35F49BB801321F522FB2B96,C853ABFC80E74DC4BB82967F029D42E2,2324EF6B39E54D17BACC2684CF4F16AA,E340A0C8A88C443BB8FAB9FCDF844FD8,6D005AF435DA48C183ACA2B0E81EDD8F,2C743FE937A9485492069A2DFD5C1503,C82D39BA61EE465E95EB5D9C16B5A5F8,975DDFA55BAD4CB9AF9B8435DD12D7A0,8D2AAA7E604C47DE81535132E0E6C48B,2644B64E7DC843C1A49EEED5C9AD8861,C4E159A41C614709867FD47F8455B218,CD18CEA3A5F6443E9B47DA2076F03C03,09868DD506E044AEB71468EA45014280,FFC21A886B7B442A8939CF67950E815A,783B64B7E16E4469BDAD56E05AF5403B,806B5D2219004E21AD2EA379FE966670,0598DB73327A4B4CBE02684086122065,16ACC38D0A22432E80DD09FF717B6224,EFB204879DDD41D396B2FB3A5E029323,C774409334DC43FDBC3FE3687D9DDE69,FF0C52506A3945EFB25591C780D8EB98,5D047A3692B840F58CBCDA2F54D8CF7D,82BBDFEC32274B72AB27A8E1D453F514,2ED7CF7C8C574B4BB9FA8AEA512D4D63,FB83A1D3A97D4CE099FC66AB24FBFFCA,B1D84FD139D84CB3AAB1A03CDFD6B579,FA91DD8960124653AE9B01E2F8655687,A64FB0CB369043F29A1C20EC1E613F8A,8280E4BDF99642E7A5FBFB6427D236FD,BFBAC410E31D4DE3B2CB6CAA31341CEA,DFCC55A6294C425F9E9A2776F0E0DC65,182152C8710A463CA2D015AB770F4193,31825820459F42EEADBA2E15A3F1D1FA,A1F5B06F460F4F67BBBC6AC3FE27AE85,DF65A343ABA543CF88B7A6DCD52380A3,D9CC311BEE7B435EA13ED5359665FA1C,A23C7BE09AA344D0BB7E8ACECCF84B9B,092895CF76EA44FABC262980D8A156D9,62CD82E1A1024DC8AB12DB0E4338674D,617419D69ADC49F0A5E84CE7807233EE,64FF896979C74E799DDE3F383812E4F1,CE80F7CD48AD494BA9C51D29CF2A8773,D31CC43D89D242EFBAB45C84ABCE1FF4,4F376722D18F42DBB0E86866B7017F50,F0D1C82A28DE4E0995FFD646E7A5A24D,D4D7E44F737644069A7C8FFE2A577E7A,DB90663FCEC343B6BDF99BB21C63C02F,6A3B7B0E57DD48CEACE2981F1C7C81ED,04FFD14E863C427B9E95FDD273059339,7A3EBF715DBB43258B29BFCBA7E8F8ED,71329097F6AD4455A6193BA551993DF2,45F69D028C46421C9B2897B1EB3EDD4E,26654E04FDD4405CBDB9334070DC2026,AB585C50B9934FEE8D6DCC141AECA3EE,2D288394D33F449F8C5BE09A23B5F97B,288B1466C1024455A5C80DE9944C275E,16303BD6F5C74355A3E6ED4DB60B8A67,469ACE6358FB4C0EA58058FA823EAFEC,0D796DFE59D0443E93A2CA46F607886E,790BA1D65CA34B72AFA6ED87355A6337,9228CFE725604EA0BF01C676B5C5E72A,BF77D03787D84C9888FCFBD012BFDA02,043D618911174C8D85F2B97407B3B652,08537956D91D40B69AE040254CAF341E,DDDD4C61896142B78A1EA29105A082AD,BDA0ECE46C39499491FD6149E787C9F4,96B08A8DB32C49E2A809E156DB592842,D3E00B67031D4A309FE917292CF1F719,77D3336DC2214AE6A7304A23FD35A805,F04CEDB8E1FC4341958071416F24AD05,2484267157304B488B71329DDB3D8421,D76C8E0696EA4C62B38DBD29ACB602E7,F3CE6131A1674567ADC67FA3FD764B7E,6B6A074DD75A415C958AC44CA5755B60,38D225ED623B4E13B78C2C917579E440,6A247D9E877C4A5689C8A90BCBD8F957,537C0C44F0C740CA917101B6413C9AB5,C851613D607F47F99AAD8516BBA438F4,1955B39FD1884AB180F1F69F45C0B1BE,43C4BA0AFB8B486B9AACBD519E403AD9,1526521C6C704155A625CF21CE913BF4,0917477F7B8B48228D2A13D8B5E5D0C7,D1331BB2694840FD8B38D5857E4D8C05,317DAAB1CF49470CA3FD565D773666DD,943596C335724B139171B9EDA473DA53,9178C2F840EB4CD9B1098A333EBFA992,B8184BF4838A4B4FA7809FDCBB25504E,AEDAF1F20FAF44FC93AB35D2DFD3E5C5,B6E2D1B581464191AD48AFF6AED9B813,C2BAA87926B14FCCB7B6C481EFAA395C,972455AB23EC47A1A2C31B53F5C06E68,8969F75D79B6402BA45B7DF1EA54435D,531F3B4C89EC4BF180B6616F94656FA1,E853EC3DE4244365BE97935652115E35,043739981A1D4C5BBACAC37926B2104C,9D1090AFC1D043B2A8086A4FFF8D31E4,8DF1BD24A1EB4F4F918E75236873A402,00FC5F98BDE047F99C062F6ABD2DCB9B,F5CA78C4CDAC45758F3D3518EB2938C5,6027B0644E5E4A238FBD6CAC1F44DDE3,15F7BFB3DA804535BDD03E216EB851B4,2CD3172D63644694A19E7BE676B63362,696A3525F40E4E01B538CF3E729CB410,68269B60854A41C48A55EC4FB363E5F3,B54CFF4B5FED44A9853F2F6FA3FFC931,11009FD31FA045C3910556DDB72C5817,86B7EAE491FF4025946652B3423A4EB5,C83B8D6D3DBA455B8C4973F68D8E2F59,FD8E0F9DA2124FCB954859AB6F48755F}'::text[])))
SubPlan 1
-> HashAggregate (cost=1515.10..1516.46 rows=91 width=42) (actual time=1.837..1.837 rows=1 loops=1050)
Filter: ((l.qtyordered - sum(COALESCE(m.qty, 0::numeric))) <> 0::numeric)
Rows Removed by Filter: 3
-> Nested Loop Left Join (cost=5.13..1514.42 rows=91 width=42) (actual time=0.749..1.825 rows=12 loops=1050)
-> Index Scan using c_orderline_order on c_orderline l (cost=0.56..370.14 rows=91 width=37) (actual time=0.728..1.626 rows=11 loops=1050)
Index Cond: ((c_order_id)::text = (o.c_order_id)::text)
-> Bitmap Heap Scan on m_matchpo m (cost=4.57..12.56 rows=1 width=38) (actual time=0.016..0.016 rows=0 loops=11861)
Recheck Cond: ((l.c_orderline_id)::text = (c_orderline_id)::text)
Filter: (c_invoiceline_id IS NOT NULL)
Rows Removed by Filter: 0
-> Bitmap Index Scan on m_matchpo_ship (cost=0.00..4.57 rows=2 width=0) (actual time=0.014..0.014 rows=1 loops=11861)
Index Cond: ((l.c_orderline_id)::text = (c_orderline_id)::text)
-> Hash (cost=19.05..19.05 rows=306 width=33) (actual time=0.237..0.237 rows=306 loops=1)
Buckets: 1024 Batches: 1 Memory Usage: 20kB
-> Seq Scan on m_pricelist pl (cost=0.00..19.05 rows=306 width=33) (actual time=0.005..0.145 rows=306 loops=1)
Filter: (istaxincluded = 'N'::bpchar)
Rows Removed by Filter: 98
Total runtime: 3910.486 ms
|