Geohash has precision levels ranging from 1 and 12 (e.g., 2p5qnb2). The longer a precision level, the smaller the size the Geohash covers.
What will be the total memory needed to store all Geohash strings?
For each Geohash character, it could be made up of 0 - 9 digit or 22 lowercase alphabets (all alphabets except "a", "i", "l" and "o"). This makes each character can be fit with 5 bits (2 ^ 5 = 32 possibilities from digits and lowercase alphabets), but let's assume 1 byte for each character for simplicity.
Below is my calculation:
- For precision level of length 12, we will need 12 bytes each, and we will have 32 ^ 12 of Geohash strings.
- Similarly, for precision level of length 12, we will have 32 ^ 11 of Geohash strings.
- And so on.
So we will have 32 ^ 12 + 32 ^ 11 + 32 ^ 10 ... + 32 = ~ 1.19 x 10 ^ 18 bytes = 1,190 PBs, which seems way off to me.