3 ms·
It's pretty much pointless if all you are doing is caching the result of a simple query using an index. Not if your database is under heavy load, and you can e
by abstractbill 18y ago
It's pretty much pointless if all you are doing is caching the result of a simple query using an index.
Not if your database is under heavy load, and you can easily shift some of that load by putting frequently accessed things in memcached instead.
- ars 18y agoThat's if you have two machines. The comparison was vs keeping stuff in a hash table in memory, and I was saying databases are no worse.
- abstractbill 18y agoThe comparison was vs keeping stuff in a hash table in memory, and I was saying databases are no worse. But that's clearly not true. In the most extreme case, that hash table is referenced simply by a variable in your program - it's already in your program's address-space! There's no way a database can come close to that.
- gnaritas 18y agoNot to mention that you can hash arbitrary objects in a hash table with no mapping of any kind. hash at: key put: anObject Databases are vastly more complicated and require me to completely disassembly the object graph anObject may contain into a set of tables and rows to store it, and then reassemble the graph from tables and rows back into their object form when fetching. The second one commits to using a relational database, one often easily triples the size of the code base. There's nothing simple about that.