3 Comments
Aug 26Liked by Vivek Bansal

Wow. This is the most helpful post I ever came across. Thanks a lot.

Expand full comment
Aug 4Liked by Vivek Bansal

Can you explain the reason behind why plain hashing on the geohash string wont work? As you wrote in this point?

> We still might be doing full table scans to find the relevant places. There has been no indexing done till now. Even if you do indexing on the full 10-length geohash stored in the SQL table, there might be some geohash indexes that have only 1 place inside the index. Hmm, not a very good use case for building indexes.

Expand full comment
author

Hey Raghwendra,

Indexes are built on a column so that search queries can filter the required dataset in less time. If we pick any 10-length geohash, then it will represent an area of 1 meter square. The number of places in this area or index would be very less. Thus, we might have to scan multiple indexes to get the desired data which defeats the purpose of having an index.

Thus, it's not a good idea to build index on full 10-length geohash.

What would be more amazing is: if we have index built on first 5-length geohash and then a lot of places would be included in this index. Thus, the data scanning will be much faster and search queries will run in less time.

Expand full comment