search

Home  >  Q&A  >  body text

Combination use of MySQL and redis cache

Guys, I want to ask a question. I now have a statistical need to count the consumption of users in the store in the current month, 3 months and 6 months this year; then I plan to first use MySQL to collect the consumption of the store users. The order records are checked once and then put into Redis. If you query again on the same day, you will check Redis, and you also need to perform filtering and statistics


************2238 days ago1187

reply all(3)I'll reply

  • 虔

    2018-11-13 00:05:10

    It mainly depends on how you design your *** table. If all your information is in one table, there is definitely no way to achieve it.

    reply
    0
  • 灭绝师太

    灭绝师太2018-11-11 11:25:18

    Yes, you can use redis or memcache

    reply
    0
  • ******

    I want to save all the order table data in the database to Redis, and then use Redis for query, filtering, statistics and other actions. How should I operate in this way? List and hash are not convenient enough; or how should I create a key?

    ****** · 2018-11-12 13:56:29
  • Cancelreply