Page 1 of 1

Devart LinqConnect Model not optimized for Oracle

Posted: Tue 15 Jun 2010 20:18
by doggy8088
Here is my sample code:

Code: Select all

            MyOracleDataContext  db = new MyOracleDataContext();

            db.Log = Console.Out;

            DataLoadOptions opts = new DataLoadOptions();
            opts.LoadWith(p => p.ParentTable);
            //opts.LoadWith(p => p.ChildTable);

            db.LoadOptions = opts;

            var q = from p in db.ChildTable
                    where p.ParentTable.Name.Contains("SomeKeyword")
                    select p;

            foreach (ChildTable app in q)
            {
                Console.WriteLine(app.ParentTable.Name + " : " + app.Name);
            }
I've been setup a Query Plan to this connection, but the result it not what I expected. For this foreach loop, it still query many times to the db.

Is this a known issue?

Posted: Tue 15 Jun 2010 20:49
by doggy8088
I was just confirmed that this problem is only occurred when querying Mandy-to-One situation. (a.k.a. Query from child table and will use some parent table columns. )

If I setup a DataLoadOptions for One-to-Many situation, there is no problem at all.

Posted: Tue 22 Jun 2010 10:24
by AndreyR
Thank you for the report, we are investigating the situation.
I will let you know about the results of our investigation.