Top "Select-n-plus-1" questions

Use this tag for the ORM problem known as select N+1 queries.

What is the "N+1 selects problem" in ORM (Object-Relational Mapping)?

The "N+1 selects problem" is generally stated as a problem in Object-Relational mapping (ORM) discussions, and I understand that it …

orm select-n-plus-1
Hibernate Subselect vs Batch Fetching

Hibernate provides (at least) two options for getting around the N+1 query problem. The one is setting the FetchMode to …

hibernate subquery select-n-plus-1
EF Core nested Linq select results in N + 1 SQL queries

I have a data model where a 'Top' object has between 0 and N 'Sub' objects. In SQL this is achieved …

c# sql-server linq entity-framework-core select-n-plus-1
Preventing N+1 queries in Rails

I've seen a few examples of passing an :include hash value when calling one of ActiveRecord's find methods in Rails. …

ruby-on-rails query-optimization entity-relationship select-n-plus-1