+ jOOQ includes a powerful diagnostics SPI, which can be used to detect problems and inefficiencies on different levels of your database interaction: +
+ +
+ Just like the
+ This feature incurs a certain overhead over normal operation as it requires: +
+ ++ The following sections describe each individual event, how it can happen, how and why it should be remedied. +
+
+ The SPI method handling this event is
+ If you're using jOOQ (or an ORM) to eagerly fetch your entire result set, then this will not be a problem in your code base, but when working with jOOQ's
+ While it is definitely good not to fetch too many rows from a JDBC ResultSet, it would be even better to communicate to the database that only a limited number of rows are going to be needed in the client, by using the
+ An example is given here: +
+ +
+ The SPI method handling this event is
+ A common problem with SQL is the high probability of having too many columns in the SELECT * or some refactoring which removes the need to select some of the projected columns, but the query was not adapted.
+
+ If the columns are consumed by some client (e.g. an ORM), then the jOOQ diagnostics have no way of knowing whether they were actually needed or not. But if they are never consumed from the JDBC
+ The drawbacks of projecting too many columns are manifold: +
+ ++ An example is given here: +
+ +