Couchbase:最好是单独检索列表对象或每个对象? [英] Couchbase: is it better to retrieve a list object or each object individually?

查看:227
本文介绍了Couchbase:最好是单独检索列表对象或每个对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用couchbase快速和分布式访问数据。
我有通过密钥comm- {index}存储的社区对象,其中{index}是给定社区对象的关键索引(即comm-1存储对象1,comm -2存储对象2 a等等)。

I'm currently using couchbase for quick and distributed access of data. I have Community objects being stored by the keys "comm-{index}" where {index} is the key index for a given community object (i.e. comm-1 stores object 1, comm-2 stores object 2 a so on).

我需要检索包含所有社区对象的列表,我想知道:是否一个接一个地做一个GET对象,将它添加到一个列表中,或以其他方式存储一个由一个键标识的List对象,并在一个GET中检索整个列表对象是更好(更快)的。

I need to retrieve a list containing all of the Community objects, and I wonder: would it be better (faster) to do a GET of every object one by one and add it to a list, or otherwise, storing a List object identified by a key, and retrieve the whole list object in one GET?

我不确定是否因为couchbase的分布式属性和对象的大小有限,检索每个对象(例如许多couchbase示例)会更快或同样快速。 p>

I'm unsure if because of couchbase's distributed nature and limited size for objects, it would be faster or just equally fast to retrieve every object individually (such as many couchbase examples do).

推荐答案

Couchbase 2.0将支持Map / Reduce动态视图,这样您就可以编写映射功能,将过滤所需的所有密钥然后构建增量索引

Couchbase 2.0 will support Map/Reduce powered views, which allows you to write map function which will filter out all the keys you need and then build incremental index

这篇关于Couchbase:最好是单独检索列表对象或每个对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆