3 ms·
I just found out this package and absolutely love the idea of "sanitizing" the queries. However I'm just wondering: if I'm a solo dev and I already monitor all
by bluewalt 5y ago
I just found out this package and absolutely love the idea of "sanitizing" the queries. However I'm just wondering: if I'm a solo dev and I already monitor all my endpoints using Django Debug toolbar, how is it still useful to use this package?
- Nextgrid 5y agoI doubt it. In my entire career I've got away with just relying on a "gut feeling" about whether a query needs a select/prefetch_related and it has yet to fail me. Yes, you're going to have a handful of stray queries here and there that could technically be avoided, but is the extra developer effort worth it? Hardware is very cheap (well if you know where to look, definitely don't look in the clouds), take advantage of that. Unless you're programming purely for the sake of programming, what matters is the end result and the problem your application is solving. Your code doesn't have to be 100% perfect (otherwise why are you using a dynamically-typed, interpreted language?), it just has to work well enough to solve the business problem - other tools such as monitoring will quickly tell you if you've made a mistake and you can go back to the drawing board and add that extra select/prefetch_related you missed the first time.