Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Setting logSlowQueries should not automatically enable profileSQL for all queries (#94101) #31
Hello fellow developers!
I was analysing a couple of flame graphs with the setting logSlowQueries enabled and saw the following method was very frequently called: LogUtils.findCallingClassAndMethod
When using a lot of short queries the stack trace gathering accounted for 30-40% of the samples.
The methods in question are:
I looked around and in the other places I've found where profileSQL is used. It is handled separate from logSlowQueries. It seems like in the two places it was just left there out of convenience.
In my humble option should findCallingClassAndMethod should only be called if profiling/usageAdvisor is enabled or if logSlowQueries is enabled and a slow query is detected.
I provided a pull request that would change the following:
In 1.) i remove logSlowQueries from the boolean expression since it is not used later on anyway.
Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at http://www.oracle.com/technetwork/community/oca-486395.html