Batch adding problem of redis ordered set

redis orderly collections add elements in batches. The zadd method can add multiple elements, and the pipeline pipeline can also implement batch operations. If there are 5, 000 pieces of data to add, which method should be used? can zadd be used to add more data? what are the details of the underlying implementation?

Php
Mar.11,2021

zadd can be added, but because redis itself is single-threaded, too much data will block and get stuck for a period of time, but five thousand pieces of data is not really too much, so it's best to use pipe.
https://redis.io/topics/mass-.
http://redis.cn/topics/mass-i.

Menu