help with data update strategy
-
Hi Guys, As of a few days ago I started to venture into the world of SQL. Subsequently I have a question on best practices relating to data population of a win form component. For example, if you have a sql table which has a product column containing about 100 items. Now you want to pass these product items into a combo-box's drop down list ? What would be the best way of doing it ? At the moment, I can set the data source property of the combo-box directly to this table containing the product items column. However, the product item's column changes data changes say couple of items per hour then what would be a good best pratice of keeping the combo box's drop down list updated ? My idea would be to use data caching and apply a time expiry policy. Is my approach incorrect or too extreme for what I want to do. I would really appreciate if someone could give me guidance on this. Thanks Vee
-
Hi Guys, As of a few days ago I started to venture into the world of SQL. Subsequently I have a question on best practices relating to data population of a win form component. For example, if you have a sql table which has a product column containing about 100 items. Now you want to pass these product items into a combo-box's drop down list ? What would be the best way of doing it ? At the moment, I can set the data source property of the combo-box directly to this table containing the product items column. However, the product item's column changes data changes say couple of items per hour then what would be a good best pratice of keeping the combo box's drop down list updated ? My idea would be to use data caching and apply a time expiry policy. Is my approach incorrect or too extreme for what I want to do. I would really appreciate if someone could give me guidance on this. Thanks Vee
Hi Vee. I think your expectation of production traffic would drive this question. In many of my apps for low to moderate traffic, I just use a live query at run-time to retrieve the dropDownList items without any caching. But if you found that performance suffered this way for your site, I don't think it's extreme at all to use caching - you could use the Application cache for this, or if you're using ASP.NET 2.0 you could use the new SqlCacheDependency class. Here's a link to an example[^].
-
Hi Vee. I think your expectation of production traffic would drive this question. In many of my apps for low to moderate traffic, I just use a live query at run-time to retrieve the dropDownList items without any caching. But if you found that performance suffered this way for your site, I don't think it's extreme at all to use caching - you could use the Application cache for this, or if you're using ASP.NET 2.0 you could use the new SqlCacheDependency class. Here's a link to an example[^].
-
thanks for the reply Mike. In your reply you stated that the expectation of the production traffic would drive this question. In response to that statement what are the test procedures you undertake to model traffic conditions on your database.
Hi there. Well, if you are really concerned about it, you could acquire software tools to assist in testing your web sites at high loads. There are many commercially available (try Google for "web stress testing" and you'll find a bunch) So how many hits a day/hour/minute do you expect you'll get?