Performance

Posts   
 
    
shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 29-Jun-2011 08:05:34   

LLBLGEN 3.1 Release date:17-Jun-2011 .NET Framework 2.0 Oracle 9i/10g (MSORACLE)

I have a table CITY with 36000 records which I am fetching by following means.


var datasourcecity = new EntityCollection(new CityEntityFactory());


                var bucketcity = new RelationPredicateBucket();
                bucketcity.PredicateExpression.Add(CityFields.Flag == StandardFlag.recordvalidflag);
                adaptercity.FetchEntityCollection(datasourcecity, bucketcity, 0,
                                                  new SortExpression(CityFields.Description |
                                                                     SortOperator.Ascending));

There are only few field in DB which are CityId, CountryId, Createddate, CreateduserId, Description, Flag, Modifieddate, ModifieduserId, StateId.

I even tried including only CityID, CountryId, StateId and description.

The performance is too slow. It takes around 12 seconds to execute where as if i execute the same directly on DB without LLBLGEN it takes less than a second. Is there a way to resolve this since it leads to perofmance bottlenecks.

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 29-Jun-2011 09:57:39   

It's normal that it takes less than a second on the db directly, because the data isn't transferred in total and materalized into objects. Also the network might be slow. But 12 seconds is very slow for 36000 rows.

You should use paging, or limit down the resultset.

Is "Description" an nText field?

shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 29-Jun-2011 10:12:36   

Walaa wrote:

It's normal that it takes less than a second on the db directly, because the data isn't transferred in total and materalized into objects. Also the network might be slow. But 12 seconds is very slow for 36000 rows.

You should use paging, or limit down the resultset.

Is "Description" an nText field?

Yes. Description is text field. limit down the resultset is not possible because i want all records

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 29-Jun-2011 10:16:08   

What if you try to fetch without the Description field, would it be any faster? How fast?

shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 29-Jun-2011 10:23:32   

Walaa wrote:

What if you try to fetch without the Description field, would it be any faster? How fast?

Even if i remove description, there is no difference in speed

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 29-Jun-2011 11:36:44   

So when you say 12 seconds, did you measure this in code before and after the fetch method? Coz there might be many possibilities, databinding for example.

You might need profiling to pin-point the bottle-neck.

shekar
User
Posts: 327
Joined: 26-Mar-2010
# Posted on: 29-Jun-2011 11:44:26   

Walaa wrote:

So when you say 12 seconds, did you measure this in code before and after the fetch method? Coz there might be many possibilities, databinding for example.

You might need profiling to pin-point the bottle-neck.

Ok let us close this thread for time being. will revert back at later stage