Last post Jun 07, 2018 01:43 AM by Nan Yu
Jun 05, 2018 03:54 PM|EnenDaveyBoy|LINK
Let say I have an ecommerce site, and as part of that I need CRUD operation, a quality search faciltiy, and a way to review how the site works, what customers are doing etc.
So do i need different sets of records for all of these?
I started of thinking to only have 1 set and use the crud entities for everything, but the more i look into search facilities the more I realise that there is no way I can use by crud entities for a quality so I have decided to seperate them, now I started
on building a fairly minor function however it would be important to monitor what was being added. So should I also have another set of entities for all the analysis data?
Or are my crud entities badly design that i should have thought about this before? I don't think this is the case because of how I want to retain my crud entities regardless of activity but want my search entities to be slick for optimisation.
Jun 06, 2018 07:49 AM|Nan Yu|LINK
Hi EnenDaveyBoy ,
Model size(Referring to the number of entities and the amount of associations between these entities),Model complexity(Specifically inheritance involving a large number of types) ,Using Independent Associations or Foreign Key Associations usually affect
the performance like view Generation or CRUD operations.
Balance the convenience and performance always need a lot of effort . General speaking , we should avoid to put all the DB objects into one single entity model , try to make separate entity models of related database objects. Also avoid fetching all
the fields if not required , retrieve only required number of records if possible ,disable change tracking for entity if not needed ,use Compiled Query .......
Jun 06, 2018 01:04 PM|EnenDaveyBoy|LINK
Thanks for the reply and I understand those point, i guess the real answer is, its always going to be down to my requirements, but keep it as clean as you can.
Jun 07, 2018 01:43 AM|Nan Yu|LINK
i guess the real answer is, its always going to be down to my requirements, but keep it as clean as you can.
Yes . You are right .