Queries around Couchbase document

  1. If we want to add 50 additional fields to a Couchbase document, what would be more efficient: adding those 50 fields to an existing document with 200 fields, or creating a new, separate document with 50 fields? What would be the impact and trade-off of both approaches in terms of database access time and database sizing?
  2. Does maintaining a document key size similar to the example below have any impact on performance? “mmec4c.mmegi6a02.mme.epc.mnc001.mcc460.3gppnetwork.org;1618753468;151022803;1.23;2554197587”
  3. Can a Couchbase document support key aliases for the same document? For example, if a document has the key IMSI, can we create a key alias from IMSI to MSISDN and then access the same document via MSISDN as well?
  1. get() the document, add the fields, then replace() the document. Although mutateIn() can be used to add properties, there is a limit of 16 subdocument commands per call.

  2. Yes it would. Is it enough to measure? Is it enough to matter - probably not.

  3. So an actual different key. See Primary Index - Primary and Secondary Index Reference | Couchbase Docs.