- Mastering Redis
- Jeremy Nelson
- 200字
- 2021-04-02 20:37:58
Advanced sorted set operations
Similarly to sets, sorted sets in Redis support the set operations of union and intersection, although the time complexity of these operations for sorted sets is worse than for sets. Another problem with the sorted set operations is that when using a Redis cluster, union and intersection operations can only be used when the sorted set keys have been sharded to the same hash slot and run on the same node. The ZINTERSTORE
Redis command has a time complexity of O(nk)+O(mlog(m))
, where n is the size of the smallest sorted set; k, the total number of sorted sets being intersected, and m, the number of elements in the resulting final sorted set. Likewise, for the ZUNIONSTORE
command, the time complexity is O(n)+O(M log(M))
with n being the total size of all the sorted sets and m being the total number of elements in the final sorted set. Given the characteristics of sorted sets, the additional time required for these two set operations may be an acceptable trade-off. It is good to keep in mind this difference in performance between large sets and sorted sets irrespective of whether the data and your requirements require ordering or not.
- Getting Started with Microsoft Application Virtualization 4.6
- Oracle Business Intelligence : The Condensed Guide to Analysis and Reporting
- 改變思維:菜鳥也能做出震撼PPT(全彩版)
- Getting Started With Oracle SOA Suite 11g R1 – A Hands/On Tutorial
- 光影之書:Photoshop+Camera Raw攝影后期與創(chuàng)意合成
- 中文版Photoshop CC基礎教程
- CINEMA 4D新手快速進階實例教學
- Photoshop+Illustrator+CorelDRAW一站式高效學習一本通
- AutoCAD 2020與天正建筑T20 V6.0建筑設計從入門到精通
- 夢幻森林Procreate童話風插畫繪制專業(yè)技法
- Photoshop CS6圖像處理立體化教程
- 電磁場數(shù)值計算及基于FreeFEM的編程實現(xiàn)
- Excel數(shù)據分析自學經典
- AutoCAD 2022中文版園林景觀設計從入門到精通
- Moodle 1.9 Teaching Techniques