Report data, techniques to store summarized results instead of raw data
What techniques/tips can you give in regards to summarizing report data points so you don't have to store the raw data in th开发者_JS百科e database?
For example, if I was storing page view traffic for a website, and my reports were accurate to the hour I could roll-up all database rows by the hour, and then possible even create further summary tables by the various increments like per day/month etc.
Any other tricks/tips along these lines?
You are talking about data warehousing / data mining. You still need OLTP ("the raw") data in a database, but you'd create an additional OLAP data warehouse with "pre-crunched" numbers for faster report access. However, this is an expensive venture in dollars and time - definitely not suitable for web site statistics unless you were Google or Amazon. So you are better off just keeping the setup that you have, and use your queries to summarize data.
精彩评论