MySQL Forums
Forum List  »  Newbie

How to Log queries for doing performance analysis
Posted by: Jasper Callahan
Date: November 12, 2025 02:14AM

Hi,

Normally for analyzing the long running queries or associated performance issues , its advisable to set parameters like "slow_query_log" in mysql database or "log_min_duration_statement" in postgres. And with this all the queries running beyond certain duration will gets logged into the database log.

In case of cloud databases like aws aurora mysql/postgres which eventually pushed the logs to cloudwatch. And then on top of that cloudwatch logs, we can do alerting or do the analysis in case of any performance issues.

However, I wanted to understand how things work in case of some organizations which deals with PI or PCI data like say for e.g. financial institutions. As because in these cases there happens to be some sensitive information exposed in the cloudwatch logs which may be embeded as part of the literals in the sql query text. So how should one cater to this requirement?

Basically wants to have these logging features enabled at the same time not breaking the regulatory requirement of "not exposing any sensitive information inadvertently" ? As because we may not have full control on what people embeded in the sql text in a large organization with 100's of developer and support guys running queries in the database 24/7.

...

Options: ReplyQuote


Subject
Written By
Posted
How to Log queries for doing performance analysis
November 12, 2025 02:14AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.