4 ms·
Maybe I'm missing something but isn't N+1 the difference between O(1) and O(n)? Edit: Anyone want to explain how I'm wrong rather than just downvoting? Edit 2
by zimbu668 11y ago
Maybe I'm missing something but isn't N+1 the difference between O(1) and O(n)?
Edit: Anyone want to explain how I'm wrong rather than just downvoting?
Edit 2:
Understanding a N+1 problem is the equivalent of understanding the difference between O(1), i.e. fetch all data with a constant number of queries, versus O(n), i.e. the number of queries scales linearly with the number of elements.
- brobinson 11y agoIt's this: https://secure.phabricator.com/book/phabcontrib/article/n_plus_one/ https://secure.phabricator.com/book/phabcontrib/article/n_pl...
- zimbu668 11y agoYes, and when you solve your N+1 problem, you've replaced a O(n) algorithm with a O(1) algorithm.
- skj 11y agoBecause your question makes so little sense that it seems sort of like a joke.
- zimbu668 11y agoThanks for your comment, I've tried to clarify things.