And having learned that stackoverflow uses C#.net I am happy to discover it.
I noticed that at the home page or at the questions section, whenever I refresh the page. The page always returns me the latest information without fail and at acceptable speeds.
I am not sure how do you do it. Sorry for the long series of questions. I am trying to learn what is the best practices for data retrieval, paging, performance , etc
I know that the homepage only returns a limited number of questions and their stats but the questions section actually returns everything.
How do you optimise it?
*
For the homepage, do you always grab ALL the stats of the recent questions? so your query is something like "select * from questions order by datetime_created limit 20" ?
So the * contains ALL the info including question title, id, views, etc?
Do you use HttpContext.Current.Server.cache to help with that?
*
For the questions, this is even more intriguing.
How do you do the paging?
Do you always grab from the database only the results for the specific page?
Or do you grab all the results and store it into a dataset? Then you use some kind of datagrid control to help with the paging?
If it is the latter, how do you maintain the data to be updated?
0 comments:
Post a Comment
Thanks