StackExchange.Redis server.Keys(pattern:“IsVerySlow*”)

后端 未结 2 1109
半阙折子戏
半阙折子戏 2020-12-16 14:10

I\'m new to redis so I\'m doing something wrong, I\'m sure:

I\'ve stored roughly 16,000 key/values in Azure Redis.

I used the following to write the keys/va

2条回答
  •  清歌不尽
    2020-12-16 15:04

    server.Keys automatically selects between KEYS and the preferred SCAN based on server version. I suspect what is happening is that you are thus using SCAN with a too-small page-size. There is an optional parameter for page size. Try specifying something considerably larger than the default - hundreds, thousands, etc. If not specified, the page-size uses the Redis SCAN default of 10, which could cause a lot of round-trips to be required.

提交回复
热议问题