Fix n+1 queries on Rails
Learn different ways to solve n+1 queries beyond "includes", to be confident that you can handle tasks on complex data models and fix n+1 queries if they appear.
By Benito Serna
Learn different ways to solve n+1 queries beyond "includes", to be confident that you can handle tasks on complex data models and fix n+1 queries if they appear.
By Benito Serna
Do you feel or maybe your boss have told you directly that now you need to consider performance and scalability?
Do you still have troubles fixing some n+1 queries?
Do you have problems trying to find why active record is ignoring your "includes"?
Maybe you know how to fix some n+1 queries and use "preload" or "includes" here and there, but...
"Can you preload just an scope?"
"Can you change the implementation to preload via has many through?"
"Shoud we use a counter cache or just preload the counts?"
"Can you persist the calculation?... just please be aware of race conditions!"
"That fix to the n+1 queries, will hurt the performance... we need to try something else"
Ship code that fix user problems taking performance in consideration.
Be confident that you can handle tasks on complex data models.
Fix n+1 queries in the best way possible taking into account different angles.
Be one of those who help the team... next week
Start your road to fix n+1 queries like a pro, with my ebook Fix n+1 queries on rails that will help you:
Here is the full table of contents of the book.