Hacker News new | ask | show | jobs
by lr4444lr 1180 days ago
I don't disagree with the author in principle, but I find once the data gets big enough where it makes a difference, I've already shifted to using ".values()" to avoid the overhead of model creation, and the KeyErrors that will throw if I leave the query lazy is tantamount to the solution he describes.
2 comments

Same, and using raw queries too when needed. Identify hot spots and do those. Regular ORM is fine for the rest (mostly).
I usually use `.values()` and `.values_list()` only when model creation is really slow. Usually many rows fetched.