logging - MySQL - does log record the deleted query of a parent-child table? -


in mysql db 2 tables: parent , child. (a field in child refers id field in parent)

sometimes got record in child deleted.

does log-enabling (in /etc/mysql/my.cnf) me observe causes child record deleted?

one more concern:

in /etc/mysql/my.cnf, there warning:

be aware log type performance killer.

how bad be?

thanks

first: mentioned in question: a field in child refers id field in parent, means if delete parent, associated child gets deleted if field configured foreign key.

does log-enabling (in /etc/mysql/my.cnf) me observe causes child record deleted?,

yes possible log query. it's interpret logs query caused delete.

how bad be?

it surely decreases performance, totally depends on amount of data queried , logged , own server/pc architecture.

there nice statistical blog explains performance degrade:

using general log enabled (general_log = on) , log destination file (log_output = file) decreased throughput 13.4% , increased response time 17.5%.

you can read blog here.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -