3 ms·
They’re different databases that do different things with different features and different ways of laying out data. Redis functions as a cache, not a relational
by hardwaresofton 5y ago
They’re different databases that do different things with different features and different ways of laying out data. Redis functions as a cache, not a relational database — it’s not merely about speed of response.
Do not use redis as your main database, it will require you to contort very painfully to so things that are normal to most apps. Maintaining Lua scripts instead of SQL queries is a bad idea.
If this is an ad for redis labs then it’s a really bad one.
- node-bayarea 5y agoCan you give me a concrete example of were you'd contort if you were to use Redis versus Postgres? BTW, I'm just trying to really find an actual proof as opposed to mere anecdotal knowledge.
- hardwaresofton 5y agoAny sufficiently relational query... Try and generate dynamic reports on data, or an aggregation on an aggregation. The model subtly breaks even on simple questions like "I want to know all users who are currently logged in and the contents of their feed right now, with the last 5 messages they sent". You basically have to do multiple requests, MULTI, or write a lua script to get all this to happen in a transaction (so the state of the world is consistent). Such a request is trivial in relational databases, though performance of the query may not be.