tags:

views:

108

answers:

1

Hi guys,

I have 2 table, 1-to-x.

Every time I load the x-table with...

   DataLoadOptions options = new DataLoadOptions();
   options.LoadWith<Auktion>(a => a.Artikel);

my performance lose is killing me. Without the DataLoadOption my query runs ~30ms. With the Option it runs ~400ms by 1-to-30 data rows. (I get a single row from table one).

What's to do now? Ideas?

A: 

We recommend you to look into the generated queries using the DataContext.Log property in the following way, for example:

StringBuilder sb = new StringBuilder();
dc.Log = new System.IO.StringWriter(sb); 

Hope the generated query can cast light on the situation.

Devart