When to use Redis instead of MySQL for PHP applications?

前端 未结 6 695
-上瘾入骨i
-上瘾入骨i 2021-01-31 01:06

I\'ve been looking at Redis. It looks very interesting. But from a practical perspective, in what cases would it be better to use Redis over MySQL?

6条回答
  •  我在风中等你
    2021-01-31 01:57

    MySql -

    1) Structured data 2) ACID 3) Heavy transactions and lookups.

    Redis -

    1) Non structured data 2) Simple and quick lookups. for eg - token of a session 3) use it for caching layer.

提交回复
热议问题