What is the recommended strategy for using CosmosDB with Geospatial data? Cosmos DB requires a partition key and a single partition cannot exceed 10GB. So if I have more than 10GB of data:
EastLondon
and WestLondon
, I cannot search database to find out if they intersect.What's the practical way to use it?
It would be ideal if the partition key could just be a geospatial attribute. However, based on my reading, the answer is that you should limit your number of partitions, to the minimum necessary to store your data. If the partitions intersect, you would have to store the intersecting bits redundantly. If you limit the number of 20GB ( increased since you wrote your question perhaps) partitions, then the cost of cross-partition queries should be minimized.
A potential approach to living with this is to store only an ID with your geospatial data, then you can store and retrieve details associated with that ID elsewhere. This could be accomplished via a join for instance.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.