concept eager loading in category ejb

appears as: eager loading
EJB 3 in Action, Second Edition

This is an excerpt from Manning's book EJB 3 in Action, Second Edition.

You shouldn’t take the default lazy loading strategy of the @OneToMany and @ManyToMany annotations for granted. For particularly large data sets, this can result in a huge number of SELECTs being generated against the database. This is known as the N + 1 problem, where 1 stands for the SELECT statement for the originating entity and N stands for the SELECT statement that retrieves each related entity. In some cases, you might discover that you’re better off using eager loading even for @OneToMany and @ManyToMany annotations.