3 ms·
I think it depends on the data. If it's presorted by the join variable then rolling the loop is faster. Also, if the index is too big for memory, then it might
by zzleeper 3y ago
I think it depends on the data.
If it's presorted by the join variable then rolling the loop is faster. Also, if the index is too big for memory, then it might be faster to loop.
- Anon4Now 3y agoYeah. Many database tables are too large for an in memory hash join. My comment was a not very well fleshed out tangential remark on the value of practicing DS&A problems. I know a lot of devs hate Leetcode style interviews. I get it. It's not fun. But contrary to what some people say, I have run into a fair number of situations where the practice helped me implement more efficient solutions.