r/technology • u/mepper • Jun 25 '12
Two former Facebook developers have created a new database, MemSQL, that they say is the world's fastest; it is is thirty times faster than conventional disk-based databases
http://www.i-programmer.info/news/84-database/4397-memsql-80000-queries-per-second.html13
u/csolisr Jun 25 '12
The main reason that MemSQL achieves the speed it does is because of being memory based, with all the benefits and drawbacks in terms of size limits and potential data loss that carries.
Exactly what I was thinking about. Especially about data loss.
The documentation says that MemSQL writes back to disk/SSD as soon as the transaction is acknowledged in memory, and that using a combination of write-ahead logging and snapshotting ensures your data is secure.
That calms me a little, but still! Data loss is possible!
→ More replies (12)
8
u/himey72 Jun 25 '12
This isn't exactly new or revolutionary. I'm an Oracle DBA and Oracle's database engine has been doing this since at least the early 90's. Not with every piece of data because if you're using Oracle, you probably have more data than RAM, but this is exactly what Oracle's buffer cache is all about. It stores the most recently used data and the data that is likely to be used in the buffer cache for fast access. Background process are always writing modified RAM blocks to disk. MySQL is fine for smaller / low budget projects, but if you want to get true performance / reliability, you need to migrate to something bigger and better.
3
u/amoeba108 Jun 25 '12
Sounds similar to MySQL and innodb_buffer_pool
InnoDB maintains a storage area called the buffer pool for caching data and indexes in memory.
http://dev.mysql.com/doc/refman/5.5/en/innodb-buffer-pool.html
14
u/Xilean Jun 25 '12
Atomicity...check
Consistency...check
Integrity...check
Durability...check
And by check I mean "doesn't have". But it's suuuuper fast guys.
→ More replies (3)
5
u/Senor_Wilson Jun 25 '12
Cool, but at some point it will be written to disk and then it will take just as long as everything else. Memory is quick, no surprises there.
→ More replies (4)
3
3
3
u/machzel08 Jun 25 '12
Anyone find it ironic that Facebook developers are making something speedy? Clearly these guys didn't work on the app.
→ More replies (2)
53
u/aweraw Jun 25 '12
...?
So, memory access is much much faster than disk access - what else is new?