Hi Josh, I'm not aware of any such significant performance penalties within jOOQ itself (although, in case you're using R2DBC, there may still be issues that I'm unaware of). There is also little risk of running into a concurrency issue within jOOQ. The only place I recall where there's some sort of locking is the reflection cache, but it's unlikely this will be the problem in your case.
Other than that, I'd look into: Problems related to concurrency / load: - Connection pooling. Does it have the right size (both too small and too large are problematic) - Is anyone locking the table / rows, etc. or is there any other source of non-blocking contention, e.g. undo/redo log contention, cursor cache contention, etc. - Does your server have too little RAM, etc. Problems not strictly related to concurrency: - Are your statistics off (people always run SQL queries manually and see how that's much faster, but with manual SQL queries, you're typically not using bind values, so with bind values, you might run into weird edge cases if your statistics are off. An extreme example is here: https://blog.jooq.org/why-you-should-design-your-database-to-optimise-for-statistics/ ) - Are you missing an index (specifically one that might not work with bind values, in case you're relying on a function based index) In any case, your query taking ~100ms by "default" is already a hint that something's off. Unless you're doing sophisticated reporting, most queries should take less than 10ms per execution, so any load related performance issue might also be addressed by improving individual execution performance, as these queries tend to keep resources busy for way too long. Depending on your RDBMS, you may be able to analyse this directly in the database itself. E.g. Oracle Enterprise Manager can greatly help troubleshoot such problems for Oracle or MySQL databases. I hope this helps, Lukas On Fri, Feb 23, 2024 at 10:36 AM Joshua Villano <[email protected]> wrote: > Hi all, > > First let me excuse myself if this is not the correct place to ask this, > and can you kindly point me in the right direction if ever, thanks! > > Recently we've been noticing degrading performance whenever we use .select > on a single table in about 8-10 times concurrently. These range from simple > column, to column average and complex selects. Difference of 500ms when ran > solo vs 4s when other selects are ran. On sql queries they run <100ms. The > timer i use are just java System.currentTimeMillis(); before and after the > .select. > > Not sure where to start looking so let me know if/what info you need. > > jooq 3.18.4 > > Thank you! > Josh > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jooq-user/6aea62c1-1fb2-4395-820b-566aee25985bn%40googlegroups.com > <https://groups.google.com/d/msgid/jooq-user/6aea62c1-1fb2-4395-820b-566aee25985bn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/CAB4ELO6Wk8c8uJNzXAFb%3D5FdgBZppPrX%2BjMSYn5G%2BRjAayMZLA%40mail.gmail.com.
