简体   繁体   English

Mysql自定义报告系统的最佳方法

[英]Best approach to custom reporting system for Mysql

I have database of about 5 tables. 我有大约5个表的数据库。 I am going to need to get reports from the data in these tables with multiple join's etc. quite often. 我将需要经常从具有多个联接等的这些表中的数据获取报告。 I was going to build a reporting feature in PHP but was wondering the best approach. 我打算用PHP构建报告功能,但想知道最好的方法。 I only have a MyISAM engine and it cannot be changed. 我只有MyISAM引擎,无法更改。 The best way I can think of is to create 2 of each table and use a trigger to write the same row to both tables, and grabbing reports from one set only. 我能想到的最好的方法是为每个表创建2个,并使用触发器将相同的行写入两个表,并仅从一组中获取报告。 If you think there is a better way than this I would love to try it! 如果您认为有比这更好的方法,我将尝试尝试!

I would just set up replication and run all my reports on the slave. 我只是设置复制并在从属服务器上运行所有报告。 I do this for a couple of systems I run. 我为运行的几个系统执行此操作。 Usually a separate VPS so that reporting load doesn't affect anything in production. 通常是单独的VPS,以便报告负载不会影响生产中的任何内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM