erikgrinaker / toydb

Distributed SQL database in Rust, written as a learning project
Apache License 2.0
5.99k stars 555 forks source link

Improve SQL key encoding #23

Closed erikgrinaker closed 4 years ago

erikgrinaker commented 4 years ago

All storage keys (even individual rows and index entries) currently use full identifiers for tables and columns, they should use integer identifiers instead. They must also escape separators.

erikgrinaker commented 4 years ago

Lexicographical and numeric ordering for varints are the same.

erikgrinaker commented 4 years ago

The additional indirection isn't worth it, especially since it's not possible to change table and column names. The MVCC and SQL key handling was improved in 37dfa6e.