Search:

Search all manuals
Search this manual
Manual
Couchbase Developer's Guide 1.8
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
2 Using Couchbase SDKs
Chapter Sections
Chapters

2.5. Storing Information

2.5.1. Set
2.5.2. Add

These operations are used for storing information into Couchbase Server and consist of add and set. Both operations exist for all SDKs provided by Couchbase. For some languages, parameters, return values, and data types may differ. Unique behavior for these store methods that you should be aware of:

For existing keys, set will overwrite any existing value if a key already exists; in contrast add will fail and return an error. If you use replace it will fail if the key does not already exist.

The following storage limits exist for each type of information that you provide as well as the metadata that Couchbase Server automatically adds to items:

Be aware of key and metadata size if you are handling millions of items or more. Couchbase Server keeps all keys and metadata in RAM and does not remove them to create more space in RAM. One hundred million keys which are 70 Bytes each plus meta data at 150 Bytes each will require about 20.5 GB of RAM for a cluster. This figure does not include caching any values or replica copies of data, if you consider these factors, you would need over 40 GB. For more information, see Couchbase Manual, Sizing Guidelines.