Comment by vlovich123
1 day ago
> Obviously, this doesn't matter when you have 5 fans, but in general, you want to push your restrictions as deeply into the query as possible from an optimization standpoint.
Depends where the database lives. If it's an in-process SQLite DB instance, there's no difference & doing this in code is easier to understand than more complicated SQL queries (of course not necessarily in this case but in general). But in all other cases you are correct about efficiency in general (although again other effects can dominate & make it irrelevant).
No comments yet
Contribute on Hacker News ↗