Solving the N+1 Problem; or, A Stitch In Time Saves Nine @ZendCon 2015 [Video Stream and Download]

Author: - di
Solving the N+1 Problem; or, A Stitch In Time Saves Nine @ZendCon 2015 [Video Stream and Download]:
Download Video

Presented by Paul M. Jones
When dealing with databases, developers frequently run into the N+1 problem, in which they populate domain objects via queries in loops. This causes terrible performance drags. There is a solution in plain PHP that makes the number of queries constant to increase performance overall. The talk shows typical PHP code involving the N+1 problem, then shows how to solve the problem in plain PHP (that is, without a framework or ORM), and includes editorializing about the origins of the N+1 problem in the developer mindset.

Contents For More