Hi
I'm getting lots of N+1 select alerts showing up in the Hibernate Profiler console, but I'm struggling to see why the profiler thinks they are N+1 select problems,
so I suspect I have misunderstood what Hibernate Profiler is trying to tell me. (I believe I understand the general concept of the N+1 select problem in Hibernate,
and how to avoid it.)
For example, the following query is flagged with N+1 select alert:
select max(mytable0_.BIT) as col_0_0_
from MYTABLE mytable0_
where mytable0_.CATEGORY_FK = ?
Since it's hard to believe a projection query trigger can be the root cause of an N+1 select, is the profiler saying that this query has been called "N+1 times"
because I previously did e.g. a "select * from MYTABLE" rather than a "select *,max(BIT) from MYTABLE"?
There are other examples where a "select * from MYTABLE" is flagged with an "N+1" select alert, but it's the only SQL operation in the transaction and there
are no "for loops"; I'm struggling to understand how that could be interpreted as N+1 select.
Thanks
Alan