We are using Devart DotConnect for Oracle to generate the entity classes for oracle.
we are querying data from a large oracle database having 9 million records using LINQ to Entities in a silverlight project.
we have a complex view created in the database which joins 7 tables to retrieve the records. When we run the oracle sql queries in the oracle sql developer to retrieve first 100 records it returns within 1 second but when we run the similar query using LINQ it did not return even after one hour. I am using Take(100) to retrieve the initial 100 records.
My query looks like this
Code: Select all
Entities1 bookingEntities = new CMSDataService(new Uri(((App)Application.Current).m_strServiceBaseUri + ClientDefs.strsvcCMSMultitableService));
query = (from c in bookinEntities.V_MYVIEW select c).Take(100);
var dsQuery = (System.Data.Services.Client.DataServiceQuery<V_MYVIEW>)query;
dsQuery.BeginExecute(new AsyncCallback(c =>
{
IEnumerable<V_MYVIEW> result = dsQuery.EndExecute(c);
((App)Application.Current).ListBookingRecords = result.ToList();
}), dsQuery);
"select * from V_MYVIEW where rownum < 101"
Do I need to change some setting in the entity class. Or else what we are doing wrong?