Home  >  Q&A  >  body text

search - redis如何快速查找某个值

有时候调试的时候需要查找redis里的某个key里的值,该如何操作?

PHP中文网PHP中文网2760 days ago970

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-21 11:19:41

    You can use keys. For example, if you want to find the key containing user, use keys user. However, keys are usually not allowed to be used in production environments because keys need to be traversed.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-21 11:19:41

    Two methods, one is to represent the value with a key, and use keys to search when searching. The second method is to find the string by looping the array.
    Two methods of using redis for search optimization
    You can check out this blog, an example of php+redis. 姓名/拼音首字母搜索

    reply
    0
  • Cancelreply