by jiggawatts · 4y ago · 0 comments
ABCABCABCABC
Vector databases store them like this: AAAABBBBCCCC
This allows faster queries if you just need one (or a few) columns, because unrelated columns don’t have to be processed at all. Caches are more efficient, vector CPU instructions can be used, etc…The downside is that random single row access is more expensive because a row has to be reassembled from many locations.
Row store: “table id; row id; column id”
Column store: “table id; column id; row id”
The difference is the order used to sort the data in storage.In reality, most column store systems use a more complex partitioning scheme with row groups and the like…