Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Agreed, I do all my dev with query trace in order to make sure I'm not looping back into individual queries.

to those that don't know, Rails doesn't load the children of AR objects by default, so if you do something like

Select * from books

and then iterate through the books and get books.author_name where the author data is a relational table, you're going to get a separate query for each row.




Usually the point where you could get into trouble would look more like: book.author.name in the given example.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: