更好的性能编写通用查询日志:在文件或Mysql表中

时间:2021-03-04 04:15:19

I have one question. Working on mysql database having large amount of data.

我有一个问题。处理具有大量数据的mysql数据库。

Looking to set up general query log. But one thing I was wondering which type of general query log setup will effect less the performance ?

期待设置一般查询日志。但有一件事我想知道哪种类型的通用查询日志设置会降低性能?

Writing general query log in separate file or getting log in mysql table (mysql.general_log)

将通用查询日志写入单独的文件或登录mysql表(mysql.general_log)

Any suggestions ?

有什么建议么 ?

1 个解决方案

#1


0  

In my quest for a similar answer I came across this post that I feel explains the options and their impact pretty clearly. http://www.fromdual.com/general_query_log_vs_mysql_performance

在我寻求类似答案时,我遇到了这篇文章,我觉得很清楚地解释了选项及其影响。 http://www.fromdual.com/general_query_log_vs_mysql_performance

According to the post, having the General log disabled is your best performing option. Logical, right?

根据帖子,禁用常规日志是您表现最佳的选择。逻辑,对吧?

The next best option would be writing to a file (non-csv), and writing to a database table will come trailing in after that.

下一个最好的选择是写入文件(非csv),写入数据库表之后将会跟踪。

#1


0  

In my quest for a similar answer I came across this post that I feel explains the options and their impact pretty clearly. http://www.fromdual.com/general_query_log_vs_mysql_performance

在我寻求类似答案时,我遇到了这篇文章,我觉得很清楚地解释了选项及其影响。 http://www.fromdual.com/general_query_log_vs_mysql_performance

According to the post, having the General log disabled is your best performing option. Logical, right?

根据帖子,禁用常规日志是您表现最佳的选择。逻辑,对吧?

The next best option would be writing to a file (non-csv), and writing to a database table will come trailing in after that.

下一个最好的选择是写入文件(非csv),写入数据库表之后将会跟踪。