3 ms·
Yup. Unless you have millions of socks, you can afford to "hash" each style sock by color + pattern + size + whatever, rather than repeatedly into ever-smaller
by prawks 12y ago
Yup. Unless you have millions of socks, you can afford to "hash" each style sock by color + pattern + size + whatever, rather than repeatedly into ever-smaller piles based on just one of the metrics.
That's actually how I pair my socks from the laundry pile, anything else seems kind of silly...
This kind of recursive hash partitioning is actually being done by SQL Server when it needs to hash join or hash aggregate over huge data sets.
My pile of socks is not a huge dataset. They easily fit on the seat of my couch when laid out in pairs.