Lightning fast DB peformance!!!!

Posts   
 
    
dniasoff
User
Posts: 5
Joined: 14-Jun-2009
# Posted on: 08-Nov-2009 21:52:16   

Hi

I have an idea about using Entity collections to facilitate really fast DB performance.

I will create a WCF exposed Windows services that loads all entity collections from DB into memory upon startup.

Then when ever my websites needs to access the db they will query the windows service via WCF which will run queries against the in memory collections using Linq.

For any entities that we need to edit we will clone them into new instances, make changes in the new instance and when we're ready to commit pass them back into the collection replacing the existing instance with the cloned one and then do a save with refetch on the on the entity collection (all in one transaction).

Likewise when adding entities we will just add them to the collection and then save with refetch on the entity collection.

This means the SQL server will only ever be accessed when saving entities as all queries will be done on in-memory entity collections.

Granted the server will need added memory, dependant upon DB size (64 bit will be an absolute requirement).

Does anyone see any flaws in my logic and are there any features within LLBLGen that can assist/improve on the above concept.

Thanks for your input

Daniel Niasoff

Walaa avatar
Walaa
Support Team
Posts: 14983
Joined: 21-Aug-2005
# Posted on: 09-Nov-2009 10:05:34   

This might be the best option when querying for lists/lookups, where caching will boost the performance.

But for an entire graph in memory with complex queries. I definitly think querying the database will be better.

In other words when you want to have a query with some joins, grouping or aggregations. That's when the database server comes in handy.