从日志数据生成缓慢的报告 [英] Slow report generation from a log data

查看:153
本文介绍了从日志数据生成缓慢的报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作是创建和存储从日志表创建的报告。应用程序现已投入生产几年。一段时间后,随着日志的增长,报告生成变慢。我们的解决方案是在一段时间后从日志表中删除一些记录。我有应用程序的源代码,我需要在删除之前使日志持续更长时间,或者如果可能,使报告生成更快。

My job is to create and store reports created from log table. Application is in production for a few years now. After a while as log grows report generation becomes slower. Our solution was to delete some records from a log table after a while. I have the source code of application and I need to make log last longer before deletion , or if possible make reports generate faster.

推荐答案

我知道的最好的想法是将您的日志保存在多个表中。我猜你只需要在规定的时间范围内做报告。将新数据保存在一个表中,将旧数据保存在不同的表中。您的报告生成时间将缩短。

尝试预处理数据,然后仅保留报告结果与完整数据。
Best idea I know of is to keep your log in multiple tables. I guess you need to do a report only for defined time scope. Keep fresh data in one table and older data in different table. Your report generation time will be reduced.
Try pre-processing the data and then keeping only the report results vs complete data.


这篇关于从日志数据生成缓慢的报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆