Hacker News new | past | comments | ask | show | jobs | submit login

While this is technically true, using an index for either lookup makes the lookup happen in O(log n)-ish time, so neither is slow, even if you have a large number of active sessions.



The issue is not individual lookup time, it is the aggregate cost of millions database lookup requests that you can avoid.


Ah, sorry I misunderstood what you were saying.

Still, any modern database system could handle these lookups for all but the largest sites, so this smells like premature optimization for the vast majority of projects out there.




Consider applying for YC's first-ever Fall batch! Applications are open till Aug 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: