From 8971d7b8760d80a90a6d1ee7c783d18d9cc33a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Mon, 1 Aug 2016 19:02:25 +0200 Subject: [PATCH] Performance tips --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index acb2063ee..453b18c96 100644 --- a/README.md +++ b/README.md @@ -3547,10 +3547,10 @@ if person.hasPersistentChangedValues { Consider a simple use case: your store application has to display a list of authors with the number of available books: -- Jonathan Coe (6) +- J. M. Coetzee (6) - Herman Melville (1) - Alice Munro (3) -- Kim Stanly Robinson (7) +- Kim Stanley Robinson (7) - Oliver Sacks (4) The following code is inefficient. It is an example of the [N+1 problem](http://stackoverflow.com/questions/97197/what-is-the-n1-selects-issue), because it performs one query to load the authors, and then N queries, as many as there are authors. This turns very inefficient as the number of authors grows: