大型分析数据库响应式检索 (MYSQL)
我想为网络创建一个“谷歌分析”类型的应用程序 - 即一个基于网络的工具来为我的数据库做一些报告和图表。问题是数据库很大,所以我无法实时执行查询,因为它们会花费太长时间并且该工具将无响应。
我如何使用 cron 作业来帮助我?使我的图表具有响应能力的最佳方法是什么?我想我需要对一些数据库表进行非形式化,但是如何使这些查询更快呢?我可以将哪些中间值存储在另一个数据库表中以使其更快?
谢谢!
I want to create a 'google analytics' type application for the web - i.e. a web-based tool to do some reporting and graphing for my database. The problem is that the database is HUGE, so I can't do the queries in real time because they will take too long and the tool will be unresponsive.
How can I use a cron job to help me? What is the best way to be able to make my graphs responsive? I think I will need to denomalize some of my database tables, but how do I make these queries faster? What intermediate values can I store in another database table to make it quicker?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
商业智能 (BI) 是一门相当成熟的学科 - 您可以在任何有关扩展数据库以进行报告和统计的书籍中找到问题的答案。数据仓库。
高级策略列表包括:
一般情况下,动态报告会让人大吃一惊静态报告 - 因此,如果您需要强大的报告,我只是尝试将数据复制到适当的模型中,使用聚合,可能会更改数据库以获得良好的优化器和适当的功能,而不是批量运行报告。
Business Intelligence (BI) is a pretty mature discipline - and you'll find answers to your questions in any book on scaling databases for reporting & data warehousing.
A high-level list of tactics would include:
In general dynamic reporting beats the pants off static reporting - so if you're after powerful reporting I'd just try to copy data into an appropriate model, use aggregates, possibly change the database to get a good optimizer and the appropriate features rather than run reports in batch.