Don't store offsets for sequential multi-parts keys
Optimize tuple format for cases when all keys are sequential and start from the first field: box.schema.space.create('memtx') box.space.memtx:create_index('sequential0', { parts = { 1, 'unsigned' }}) box.space.memtx:create_index('sequential1', { parts = { 1, 'unsigned', 2, 'unsigned' }}) box.space.memtx:create_index('sequential2', { parts = { 1, 'unsigned', 2, 'unsigned', 3, 'unsigned', 4, 'unsigned' }}) box.space.memtx:create_index('random1', { parts = { 3, 'unsigned' } }) In the example above only field 3 is now indexed by offset (was 2, 3, 4). + Improve error message in field_type_create() Closes #2046
Showing
- src/box/errcode.h 1 addition, 1 deletionsrc/box/errcode.h
- src/box/key_def.h 20 additions, 1 deletionsrc/box/key_def.h
- src/box/tuple_compare.cc 54 additions, 15 deletionssrc/box/tuple_compare.cc
- src/box/tuple_compare.h 1 addition, 0 deletionssrc/box/tuple_compare.h
- src/box/tuple_format.c 38 additions, 38 deletionssrc/box/tuple_format.c
- src/box/tuple_format.h 9 additions, 4 deletionssrc/box/tuple_format.h
- test/box/alter_limits.result 3 additions, 3 deletionstest/box/alter_limits.result
- test/box/errinj.result 84 additions, 0 deletionstest/box/errinj.result
- test/box/errinj.test.lua 27 additions, 0 deletionstest/box/errinj.test.lua
Loading