Comment by zzzeek

11 hours ago

Lots of familiar things here except for this UNLOGGED table as a cache thing. That's totally new to me. Has someone benched this approach against memcached and redis ? I'm extremely skeptical PGs query / protocol overheads are going to be competitive with memcached, but I'm making this up and have nothing to back it up.

They don't compare exactly. Author is mistaken in thinking that UNLOGGED means "in memory". It means "no WAL", so there's considerable speed up there, but traded in with also more volatility. To be a viable alternative to Redis or Memcached though, the savings you get from the latter two must really be superfluous to your use case. Which could be true for many (most?).

Its not only about performance, Redis data structures offer an even more advanced caching and data processing. I even use Redis as a cache for ClickHouse.