-
Notifications
You must be signed in to change notification settings - Fork 2
Geospatial queries in DynamoDB
Justin Forest edited this page Mar 23, 2024
·
5 revisions
Amazon's DynamoDB is a key-value database, which is serverless and has almost infinite performance, but unfortunately the support for indexes is very basic which makes it impossible to run geospatial queries easily (like, filtering by lat and lon in the same query). This page collects solutions to this problem.
One solution is to divide the globe into squares of a fixed size, then assign each object to a square. That way, in theory, it might be enough to run 9 queries to get data for 9 blocks, where center is on the screen and the rest is around it. The problem is that with change in zoom, visible block size changes significantly, and we might end up requesting a huge number of items with one query, like the whole database.