sql server reports from .net web app
I set up reports to generate stats based on data in a sql server 2008 database and considering the amount of data, reports can take a long time to generate for some queries. I want to attach the reports to a web app or some app that when a user clicks on a tab or button the relevant report produces the results immediately.开发者_高级运维 someone mentioned to me doing the reports every hour and storing the results in a db and then just query the most recent. Is this the best choice or does anyone have any better suggestions. Using visual studio 2010 for coding.
There's nothing wrong with caching a report for a given period of time if your data doesn't need to be real-time.
I once worked on a project that required reports that were very time consuming to generate. There were many large tables and many joins to fetch all of the report data. The solution was to create a separate "reporting database" with tables that would contain consolidated data from the real database. The reports would query the consolidated reporting database. By doing this, the reports would only have to query the tables that contained the consolidated data, which was considerably faster. We updated the consolidated tables in the reporting database nightly with nightly batch programs.
精彩评论