Devart LinqConnect Model not optimized for Oracle

Devart LinqConnect Model not optimized for Oracle

Postby doggy8088 » Tue 15 Jun 2010 20:18

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?
doggy8088
 
Posts: 8
Joined: Tue 15 Jun 2010 18:03

Postby doggy8088 » Tue 15 Jun 2010 20:49

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.
doggy8088
 
Posts: 8
Joined: Tue 15 Jun 2010 18:03

Postby AndreyR » Tue 22 Jun 2010 10:24

Thank you for the report, we are investigating the situation.
I will let you know about the results of our investigation.
AndreyR
Devart Team
 
Posts: 2919
Joined: Mon 07 Jul 2008 13:16


Return to dotConnect for Oracle