4 ms·
1. That's not necessarily the only possible implementation. It would be trivial to assign a number to each key and keep this map in the header of the db file.
by lucian1900 13y ago
1. That's not necessarily the only possible implementation. It would be trivial to assign a number to each key and keep this map in the header of the db file.
2. That's not really the issue, I don't care about the size of small dbs. Large dbs have gigantic sizes.
3. That is absolutely abysmal, yes.
It doesn't just use 2x as much space as other dbs, in practice that can be up to 20-30x as much in bad cases. It's commonly at least 5x.
It really is absolutely terrible when compared to pretty much anything. It's slower than safer dbs that can do the same and more things. There is no selling point.
Just don't use it.
- remon 13y ago1) Not trivial at all. As documented in a rather broad range of papers and whatnot. You're almost certainly oversimplifying the problem. 2) For gigantic DBs the preallocation overhead is almost non-existent. 3) Fair enough. Your last point is, again, is not fact. It's not slower but on average measurably faster than most commonly used RDBMs with equal "tuning" efforts if utilized for the same task. I can't help but feel you're not entirely objective here ;)
- lucian1900 13y ago1) I don't think I am. The problem of (structural) subtyping is well known and researched and applying it to a database would not break new ground either. 2) The preallocation overhead is not what is the problem. The files are simply extremely large for the amount of data in them. There has been plenty of measurement and I have done some of my own. With unacknowledged writes it's quite fast, but no other database client I know of does that because it's stupid. With the highest durability and safety mode it's slower than at least Postgres and Mongo still doesn't have transactions or generic indexes.
- jeltz 13y agoPostgreSQL and MySQL both support compression of data, so even if you do not solve the duplicated key problem you still can reduce disk usage. The only benchmarks where I have seen MongoDB winning have been those where MongoDB was configured with different consistency requirements than MySQL and PostgreSQL. My suspicion is the MongoDB is slowest but I have never seen any high quality benchmarks.