Import UUID from CSV using "mongoimport"

Thank you for getting back to me Emil.

Currently we are storing spatial features in a number of (manually) sharded PostgreSQL databases. All the features are being identified by a globally unique id (uuid). In order to keep track of the features per shard, we need to maintain an index.

We plan to start using MongoDB as a “feature id index” toward the PostgreSQL databases. The collection schema will contain a mapping between the UUID of the feature (key) and a PostgreSQL database (value).

  1. The user of our API will request information about a specific UUID (get feature by id). The UUID will be the main entry into our documents of the collection. The query operator will be most likely “$eq” for a single UUID and possibly “$in” for multiple UUIDs.

  2. The index will contain billions of entries. I assume (I might be wrong) that storing a “UUID” type instead of a plain “string” might have a significant effect on the storage used. I also wonder if there is a performance impact execution the queries mentioned above.

Best regards,
Thomas.