4 ms·
My reason for liking MariaDB is that MySQL uses a B-Tree for primary storage. In Postgres if you want a table with large keys, you have to store them twice once
by srcreigh 4y ago
My reason for liking MariaDB is that MySQL uses a B-Tree for primary storage. In Postgres if you want a table with large keys, you have to store them twice once in the index once in primary storage (hash table). In MySQL there’s no hash table you basically just store the rows in an index. Could be as much as 40% reduction in storage… 400GB instead of 1TB.
Postgres does have index compression as of a recent version, but I’m not sure how much that would improve random keys.
- ttfkam 4y agoA 40% reduction would be 600GB, and an index that took up 40% of the total would be excessive/unrealistic as well. You're right of course that Postgres lacks true clustered indexes. The closest thing it has is covering indexes, which don't help at all with saving space; quite the opposite in fact.
- srcreigh 4y agoThanks. You’re right. And yeah, the 40% ish reduction would only happen if the table has for ex every column in a unique index. Not very common.