In my application I need to access a set group of information from database very often. Is it more efficient to get this information and store it in a user defined datatype or is it more efficient to keep accessing the database as and when required. I'd also like to know why aswell if you could.
Many thanks and kind regards.
James Webb
Jignesh TrivediPosted Sep 8, 2014, 12:45 AM
Hi,
As per me, If this data is not change very frequently, so you can use SQL dependancy
Please refer
http://msdn.microsoft.com/en-us/library/62xk7953(v=vs.110).aspx
Basically It is also depending on what type of data you want to store in cache (storage), If this data frequently used in your application than it is good idea to keep data in to cache.
hope this will help you.
Nitesh KejriwalPosted Sep 7, 2014, 11:03 PM
it basically depends on what kind of data is being retrieved from the database and does it changes very frequently. For example - If you are retrieving the username of a logged in user, it is advised to store it in local datatype rather than calling it everytime from database. In other case, if you're retreiving the stock of aproduct that may change in every call, you should make database calls to get the updated stock.
Basically, it all depends on the type of data being retreived from the DB.
Hope this helps.