For byId lookups, it looks like org.hibernate.loader.ast.internal.SingleIdEntityLoaderDynamicBatch#load is called, and that causes SQL translation over and over again, though it should be cached. It is also looks fishy to me that we do not try to cache SQL statements for a certain batch size, though that isn’t important for now. |