Also, don't forget to look into setting useful batch sizes for classes and collections. In that case you may not need all the fetches.
/Oskar 2017-03-14 21:00 GMT+00:00 Gunnar Liljas <[email protected]>: > Avoiding the "select n+1" is usually MUCH more important than avoiding > the joins. > > /Gunnar > > 2017-03-14 15:18 GMT+01:00 Felipe Oriani <[email protected]>: > >> Hello guys, >> >> I am using the NHProf to trace my queries and check possibles issues and >> improve it. The NHProf has some alerts that it is built in the tool as a >> suggestion to improve your statements. >> >> I have a scenario where we have the problem to "select n+1", where the >> code was executing something around 80 queries. We add some Fetch and we >> reduce it to 1 query. Now we have a new alert on NHProf that is to "avoid >> too many joins". with something around 6 joins on the query. We really need >> all columns on the result. >> >> My question is, what is the best to do? >> >> Thank you. >> -- >> ______________________________________ >> Felipe B Oriani >> [email protected] >> >> -- >> You received this message because you are subscribed to the Google Groups >> "nhusers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/nhusers. >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/nhusers. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/nhusers. For more options, visit https://groups.google.com/d/optout.
