Hello,
I’m looking at the information stored in the memsql.log and have a question about the contents.
Our current config shows:
In the log itself, I see:
What is the criteria for capturing the sql in memsql.log?
Thank you,
Marty
Hello,
I’m looking at the information stored in the memsql.log and have a question about the contents.
Our current config shows:
What is the criteria for capturing the sql in memsql.log?
Thank you,
Marty
Hi Marty,
This will only log queries that hit the system if the system variable general_log
is not 'OFF. The options for enabling the general_log are ‘ON’, which logs all queries, or ‘PARTIAL’, which logs a sample of the queries that hit the system.
You can review more documentation about the general_log here: Trace Log · SingleStore Documentation
Note that we recommend the general_log be ‘ON’ only for troubleshooting purposes, as there is a performance impact for logging all queries.
Best,
Roxanna
Hi Roxanna,
As you can see above, we do have general_log=OFF, but we are still seeing the queries in the log. Does the general_log only pertain to the query.log? Is there another setting to eliminate the queries from the memsql.log itself, or is that default behavior?
-Marty
Hi Marty,
Thanks for clarifying. If you change the general_log setting to ‘ON’, that will log all queries in the query.log and is independent of the memsql.log.
As far as what you see in the memsql.log, the memsql log prints information regarding errors, warnings, and from a query perspective, the MemSQL.log (tracelog) will print queries if its the first time they are being compiled in the database (they will show up in the log in a parameterized fashion), which is what you are seeing in the screen snippet you sent me above.
This is the default behavior. Note that there is not an explicit setting to control whether we do or do not print those compiled queries in the log (that won’t affect other information we capture). Because you will lose other valuable information, we do not recommend changing these settings.
Can you explain more about why you would like to disable the newly compiled queries from showing up in the log? I can file a feature request.
Other information in the tracelog includes things like clustering activities that are useful for debugging purposes (e.g., Add/remove leaf, backup initiated…). We also log information about dropping tables and views.
Hope this helps!
Best,
Roxanna
Thank you Roxanna,
If that is the default behavior that is fine. The explanation regarding the contents of the memsql.log helps immensely. We weren’t sure if it was logging all the queries, but your description indicates it is not.
Thanks,
Marty
Hi Marty,
That’s correct. We will log only the newly compiled queries. If you were to run that query you showed in your code snippet again, it would not be captured by the memsql.log
Best,
Roxanna