Jooq query explain to find performance on production

112 views
Skip to first unread message

mukul panwar

unread,
Oct 21, 2023, 6:20:33 AM10/21/23
to jOOQ User Group
Hi

Is there any way to enable logging to check execution time of queries using Jooq logging. We can not change or plug any code as of now because it’s deployed on production.

Please suggest?

Lukas Eder

unread,
Oct 23, 2023, 2:26:45 AM10/23/23
to jooq...@googlegroups.com
Hi Mukul,

jOOQ has some out of the box DEBUG logging:

That logs way too much for your purposes, I would imagine, to an extent where logging itself might add overhead that will be included in measurements, but perhaps it's still good enough? Note that jOOQ doesn't log execution times, but you can configure your logger to include timestamps, from which you can derive execution times.

Other than that, most RDBMS maintain execution statistics in their dictionary views. For example, in Oracle, you can get a lot out of the v$sql and related views. In PostgreSQL, there's pg_stat_statements. In SQL Server, there's dm_exec_sql_text and related views and functions, in MySQL, there's the performance_schema.

I hope this helps,
Lukas

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/bb91e800-e444-4c80-ab73-92dda8617ba2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages