hibernate-reactive
hibernate-reactive copied to clipboard
log usage of statement batching
@Sanne thinks there might be a problem with batch inserts/updates not happening efficiently, and it would help to log some information to help diagnose this.
@Sanne I'm ready to work on this, but can you give me a bit of a better idea of exactly what sort of log messages would help here? Thanks.
@Sanne, any detail you can add to this issue?
Sorry I missed the previous notifications.
And to be clear this might need to be addressed in ORM core first. The main problem is that there are circumstances in which possibly
- ORM will automatically batch things
- or the opposite case, the user explicitly expects it to batch things but ORM can't and will fallback to not doing it
But it's actually hard for the user to figure out if batching is being applied effectively. I often see reports from people that enable logging of statements and then complain that batching is not effective, but this is just a side effect of how we log things: even with batching enabled, each statement is logged individually - hence it's actually not possible from examining logs to determine if batching actually was performed.
A first improvement could be to ensure a batch is logged "as a batch"; I'd also like if it could generate an event to be captured with JFR - but that's beyond initial scope as we don't have any JFR events yet.