2 ms·
The new BITFIELD seems like it could be really cool, but I can't quite figure out the use case. Anybody planning on using that that can enlighten me? Thanks.
by matt2000 10y ago
The new BITFIELD seems like it could be really cool, but I can't quite figure out the use case. Anybody planning on using that that can enlighten me? Thanks.
- cullenking 10y agoI plan on using it to track what database objects have a corresponding cached image thumbnail. 10 million objects in my database, thumbnails generated on the fly, fast get/set the unique ID of the object in the bitfield. very small storage for what you get.
- Gigablah 10y agoYou can already do this using BITSET -- I tracked 100 million objects with incremental integer keys during a migration process and it worked great. From what I read, BITFIELD behaves differently -- it treats your data as a series of "packed" bits. So while with BITSET you operate on each bit individually, with BITFIELD you operate on a series of bits with a starting offset, and you have to be mindful of the length.