Open Totktonada opened 2 years ago
At now I left a note here, but I'm going to structure it and add the documentation later.
The algorithm is not too complicated:
after
presents.
2.1 if first
is negative value and after
exists then we add a condition with after
value as first one for the index and the traverse order.scan value
) is selected as greater between the condition value (if it exists for the index) and after
value according to the traverse order and the index. By default is nil
(if there are no suitable conditions for the index and no after
).scan value
).after
value (based on secondary + primary key fields) while tuples < after
.So cases:
after
then traverse starts from a greater one (according to traverse order). Other conditions will be used as post-filter.after
then it will be full scan from the after
value, EQ/REQ will be added to other conditions as post-filter.after
, then a primary index with an ascending order will be used. The non-index conditions will be used as post-filter.So for the issue #276 and the pull request #277, we can consider after
as a full scan in all cases without first
<= 1000.
Initially asked in https://github.com/tarantool/crud/pull/277#discussion_r878778465.