> Because it is difficult to assume what the best encoding will be for any given workload, database systems should dynamically choose encodings based on storage and workload characteristics. It would be better just to take the storage requirement on the chin and not add a gratuitous variation in encoding which will bite you on the ass somehow (or someone else). As much as possible, pick one way of doing one thing. Yo…
The combinatorial explosion problem is nicely solved by defining good interfaces. C++ gives you iterators and algorithms that work on iterators. Clojure has sequence interfaces and functions that work on all sequence types.
Das Problem mit German Strings
21–25 of 25 posts
Re: Das Problem mit German Strings
#22Earlier quoted context omitted.
The combinatorial explosion problem is nicely solved by defining good interfaces. C++ gives you iterators and algorithms that work on iterators. Clojure has sequence interfaces and functions that work on all sequence types.
That just improves the organization of the program; it doesn't get rid of the increased risks of doing the same thing in N ways that could be pined down to one.
Re: Das Problem mit German Strings
#23Re: Das Problem mit German Strings
#24Earlier quoted context omitted.
That just improves the organization of the program; it doesn't get rid of the increased risks of doing the same thing in N ways that could be pined down to one.
Please elaborate. What are the risks of doing the same thing in N ways, other than code organization issues leading to duplicate or messy code?
Oh, you don't have to test the combinations because the code is bug free, is that the argument? Which is because of some good organization?
Those things are nicely isolated so 3 + 4 + 2 unit tests, and we are done?
Re: Das Problem mit German Strings
#25Earlier quoted context omitted.
Here is the paper in question: Umbra: A Disk-Based System with In-Memory Performance https://db.in.tum.de/~freitag/papers/p29-neumann-cidr20.pdf Section 3.1 covers string handling. This article (also linked from tfa) explains German strings in more detail. https://cedardb.com/blog/german_strings
my tl;dr: after reading the article: - two 64-bits words representation - fixed, 32 bits length - short strings ( - long strings store a 4 byte prefix in-place + pointer to the rest - two bits are used as flags in the pointer to further optimize some use-cases