This is a migrated thread and some comments may be shown as answers.

Is Update a potential performance bottle neck

1 Answer 36 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Robert Everland
Top achievements
Rank 1
Robert Everland asked on 18 Jun 2012, 04:11 PM
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? 

1 Answer, 1 is accepted

Sort by
0
Ralph Waldenmaier
Telerik team
answered on 19 Jun 2012, 08:02 AM
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.

Greetings,
Ralph
the Telerik team
OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Tags
General Discussions
Asked by
Robert Everland
Top achievements
Rank 1
Answers by
Ralph Waldenmaier
Telerik team
Share this question
or