Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Support descending indexes #268

Open
jfunston opened this issue Jun 13, 2021 · 1 comment
Open

Support descending indexes #268

jfunston opened this issue Jun 13, 2021 · 1 comment

Comments

@jfunston
Copy link
Contributor

Currently chogori platform does not support descending storage layout, and for chogori SQL we will disallow descending secondary indexes and descending primary indexes will need to be sorted and handled in the PG layer.

The difficulty with descending storage layout is that we support compound keys which are encoded together in a single string, which gives better performance than per key-field comparison and makes range partitioning easier. The problem is how to encode variable length string fields in reverse order (perhaps we can check the ELEN paper for a solution). If it is not possible than a complete solution would require re-writing the platform layer to handle keys per-field everywhere.

Some other partial solutions:

  • Support descending order for key fields that are not strings only
  • In SQL K2 adapter layer, we can transparently use a reverse order scan if there is only one primary key or the other primary keys are fully specified.
@jfunston
Copy link
Contributor Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant