tarantool对并不能获取所有元组
secondary:select({1,'RU',2}) box.space.test.index.secondarytarantool对并不能获取所有元组,tarantool,Tarantool,secondary:select({1,'RU',2}) box.space.test.index.secondary 局部r=''表示k,box.space.test.index.secondary中的元组:pairs({1,'RU',2})do r=r..',find('..tuple[1]..')if(tuple[7]仅返回唯一的(通过索引中的字段)元组?…或者tarantool将内部指针移动到列表中的下一个元组,当我们:按主键删除元组时…?我自己找到答案。tarantool在循环期间重建
局部r=''表示k,box.space.test.index.secondary中的元组:pairs({1,'RU',2})do r=r..',find('..tuple[1]..')if(tuple[7]仅返回唯一的(通过索引中的字段)元组?…或者tarantool将内部指针移动到列表中的下一个元组,当我们:按主键删除元组时…?我自己找到答案。tarantool在循环期间重建索引,所以当我成对迭代时,我跳过一些记录。正确的方法是通过选择获取元组的部分,迭代它删除每个元组,获取新部分…而数据存在。
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [34, 3, 1, 'RU', 2, 260, 5]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [37, 6, 1, 'RU', 2, 494, 5]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [40, 9, 1, 'RU', 2, 870, 5]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
---
- unique: false
parts:
- type: NUM
fieldno: 3
- type: STR
fieldno: 4
- type: NUM
fieldno: 5
- type: NUM
fieldno: 6
id: 2
space_id: 512
name: secondary
type: TREE
...
---
- ', found (47), found (44), found (42), found (34), delete(34), found (41), found(37), delete(37), found (45), found (43), found (46), found (40), delete(40), found(50)'
...
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [35, 4, 1, 'RU', 2, 633, 5]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...
---
- ', found (47), found (44), found (42), found (49), found (41), found (35), delete(35), found (43), found (46), found (48), found (50)'
...
---
- - [47, 6, 1, 'RU', 2, 11, 6]
- [44, 3, 1, 'RU', 2, 101, 6]
- [42, 1, 1, 'RU', 2, 189, 6]
- [49, 8, 1, 'RU', 2, 290, 6]
- [41, 0, 1, 'RU', 2, 303, 6]
- [45, 4, 1, 'RU', 2, 694, 6]
- [43, 2, 1, 'RU', 2, 780, 6]
- [46, 5, 1, 'RU', 2, 833, 6]
- [48, 7, 1, 'RU', 2, 927, 6]
- [50, 9, 1, 'RU', 2, 930, 6]
...