JDBC Query Logging Parameters


Every once in while I need to log slow queries using the JDBC logging parameters and it always takes me a while to find this information. So here it is (line breaks for readability):


?profileSQL=true&
slowQueryThresholdMillis=100&
autoSlowLog=true&
explainSlowQueries=true&
gatherPrefMetrics=true&
logSlowQueries=true

Simply add the above parameters to your JDBC connection string.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.