This question is locked. New answers and comments are not allowed.
I am experiencing some confusion on SQL generated from a fairly standard LINQ query.
01.var sessionQ = from sessionHdr in headersQ02. join sessionBody in bodyQ on03. sessionHdr.ID equals sessionBody.ID into sessionList04. from sessionJSON in sessionList.DefaultIfEmpty()05. where sessionHdr.Format == 13 06. 07. select new WITransmitsVP08. {09. ...10. };
Using this LINQ syntax for an OUTER JOIN I was expecting the SQL (ORACLE) generated to look something like the following ...
1.SELECT2. ...3. 4.FROM "XFEVP"."WI_TRANSMITS_VP" a 5. INNER JOIN "XFEVP"."WI_TRANSMITS_VP_MSG" b ON6. a."MESSAGE_ID" = b."MESSAGE_ID"7.WHERE a."MESSAGE_ID" = 60412762;
Bun instead when I log the output I am seeing ...
01.SELECT02. ...03. 04.FROM "XFEVP"."WI_TRANSMITS_VP" a 05.WHERE a."MESSAGE_ID" = :p0 06.ORDER BY COL1 07. 08.SELECT09. ...10. 11.FROM "XFEVP"."WI_TRANSMITS_VP_MSG" a 12.ORDER BY COL1
Two entirely separate SELECT statements. Since the second table contains MILLIONS of records the component making the call eventually crashes due to memory issues after many many minutes of latency.
Why am I not getting a actual JOIN statement in the generated SQL? What's the workaround or fix?
Thank You,
Gary