@phyziyx@ptr_to_joel They should and they very well may do so. Connection pools are usually exposed as DataSource objects to the application. Just by looking at the code it’s impossible to tell whether getConnection opens a physical connection or gets one from a pool.
@lavenderleaf86 @ptr_to_joel Only a sith deals in absolutes. I was on a project with tables that had 140 columns. SELECT * would have cut down the allocation by about two oders of magnitude. It stopped being beneficial once we introduced virtual columns for function based indices.
@lezate_@LewisCTech@ptr_to_joel I’d be interested to see numbers with current Hibernate and either DTO projection or StatelessSession. It could even be faster as it uses index based ResultSet access, something you’d generally want to avoid in “hand written” code.
@SimonLevermann@ptr_to_joel Theoretically the spec says closing the PreparedStatement should implicitly close the ResultSet, whether the driver actually does this is a different matter. But yes, everything AutoColseable should go into a try-with-resources.
@LewisCTech@ptr_to_joel 3. “It depends”, if it’s from a pool it will return it to the pool. The spec saying it should also release all the resources (prepared statement, result set, …) but whether the driver actually follows the spec is a different question.
@LewisCTech@ptr_to_joel 2. The connection should come from the pool / currently active transaction. #getConnection way still be called, DataSource can come from the pool,
@cookskii@thef1diplomat No front recuperation because auf Audi LMP1. Rest is follow up issues because recuperating with the rear is not nearly as effective.