3 ms·
For a simple "fetch one row by pkey" lookup a traditional SQL DB spends something like 2/3 of the execution time parsing the SQL. So using a binary protocol's a
by lmm 12y ago
For a simple "fetch one row by pkey" lookup a traditional SQL DB spends something like 2/3 of the execution time parsing the SQL. So using a binary protocol's always going to win on performance.
(You may be right, maybe the main value of redis is as a way to work around stupid corporate/DBA policies? I know in theory I could have a single table key / json value in Postgres, but I've never found a company willing to actually do that. Whereas in Redis it's "no, I can't define a schema for the data, because the tool doesn't have one.")
- andrewvc 12y agoYou are 100% right about the perf there, but most people don't really need to optimize those lookups, they just like to because engineers like shiny things.
- lmm 12y agoI think it's more that engineers are (rightly) lazy. Redis feels very simple - install it, run it, do your key/value operations.