in reply to initialize all values in a hash

I see that %maxBits is filled with keys that are not known until run-time. If you have a list of constant strings that can occur for $Query_id, then an up-front initialisation is possible.