开发者

Explosive indices?

I have a class like:

class Test {
    String id1;
    String id2;
    List<String> stuff;
}

if I need to run this q开发者_Go百科uery:

select from Test where id1='a' && id2='b' && stuff='foo';

am I going to get exploding indices?

Thanks


The most "explosive" type of entity is one that has 2 (or more) different List properties and you have a custom index that uses both lists (thanks to nick for the clarification about using a custom index) That is because the datastore will need to create an index entry for all permutations of items from both lists. For example, if one list contains "a", "b", "c" and the second list contains 1 and 2, a bunch of entries would be needed:

a,1
b,1
c,1
a,2
b,2
c,2

In your case, the datastore should only need to create one entry per item in your "stuff" list. More details here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜