You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a problem with cursor based pagination on requests by secondary indexes. Consider a simple key-value schema:
field
type
info
key
string
primary key
value
string
tag
string
secondary index, non unique
The call crud.select('kv', {{'=', 'tag', 'tagValue'}}, {first = 10, after = ...}) makes a fullscan of secondary index from starting point (tagValue) to tuple equaling cursor. Under heavy load it leads to CPU consumption and cluster performance degradation.
To solve this problem, we have to create a special unique index paging with two fields {tag, key} and implement pagination manually, by executing such calls like
There is a problem with cursor based pagination on requests by secondary indexes. Consider a simple key-value schema:
The call
crud.select('kv', {{'=', 'tag', 'tagValue'}}, {first = 10, after = ...})
makes a fullscan of secondary index from starting point (tagValue) to tuple equaling cursor. Under heavy load it leads to CPU consumption and cluster performance degradation.To solve this problem, we have to create a special unique index
paging
with two fields{tag, key}
and implement pagination manually, by executing such calls likeIt would be nice to introduce some feature like passing name of paging index and using key from this index as cursors
The text was updated successfully, but these errors were encountered: