I\'m looking for a fast way to calculate the hamming weight/population count/\"the number of 1 bits\" of a BINARY(1024) field. MySQL has a BIT_COUNT functio
I couldn't find a good way to do it. In the end I calculated the hamming weight in Java and periodically update the bit counts in the database.