I have changed MySQL 8 on my Windows 10 development machine to write logfiles (general log and slow queries log) to "E:\mysql logfiles". I'd like to compress this directory using the Windows "Compress Directory to save space" advanced feature in the Windows 10 directory properties to save space (currently my logfile is over 50 GB). I'm wondering though: is this a good idea? Or will this break MySQL in (subtle or not) ways?
The Windows feature to compress a directory is transparent to all applications. However, it does slow down I/O operations some.
The General Log should not be left on forever; it is a big disk hog. Instead, turn it on only long enough to get the necessary debugging info, then turn it off and toss the log file.
Or, you could log to
TABLE and not
FILE; I think the table has a limit. (Check the settings.)