Is Update a potential performance bottle neck

2 posts, 0 answers
  1. Robert Everland
    Robert Everland avatar
    6 posts
    Member since:
    May 2010

    Posted 18 Jun 2012 Link to this post

    I recently started using Open Access and from what I am seeing it's pretty nice. The concern I have is that in order to do an update to a record I have to do a select. So in my app I have an edit page that has done a select to show you the values to edit, you then click save where I have to do another select and then an update. Under normal load that isn't an issue, but I am concerned about putting OpenAccess in a very high usage app with millions of transactions. That one extra select could be a big problem. Is there any way to update the record without that or do I need to do a manual update to the record to accomplish that? Have you measured performance on a large application to see what kind of impact this has? 
  2. Ralph Waldenmaier
    Ralph Waldenmaier avatar
    202 posts

    Posted 19 Jun 2012 Link to this post

    Hi Robert,

    If you have an application wide context( which is not the recommended scenario) then it is possible to avoid the extra load because the object was loaded and is saved with the same context. Be sure to be in the same transaction, meaning between loading and saving the object there is no other call to SaveChanges() in the context. 
    In general, Telerik OpenAccess ORM is optimized to do a less queries as possible. Therefore if an object is in either the first level or the second level cache, then there is no extra query call to the database.
    To see the different approaches how to work with data in Telerik OpenAccess ORM, I would like to recommend our SDK where you can find various examples to have a good starting point.
    To your question regarding performance measuring. This is always dependent on the data model and the way you work with your data. It is not easy to have reliable results here.

    I hope this information is helpful for you.
    Feel free to ask if you have any other question.

    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
  3. DevCraft banner
Back to Top