Git Product home page Git Product logo

Comments (4)

mars00772 avatar mars00772 commented on June 27, 2024

看起来在rocksdb上实现zset函数有本质困难,zanRedisDB直接限制zset 大小10240个members了。

from zanredisdb.

absolute8511 avatar absolute8511 commented on June 27, 2024

没有限制member个数, 10240限制的是单个member的长度. 复杂度上面, zrange这种正向range比较快, 反向revrange这种会比较慢, 受限于底层db的反向迭代性能, 你可以测试下看看是否满足你的要求. 另外还是不建议这种特别多的member. 最好还是百万以内.

from zanredisdb.

mars00772 avatar mars00772 commented on June 27, 2024

看起来zrange,revrange操作还是O(N)实现(redis是O(logN)),对于这块优化,是否有计划或策略呢

from zanredisdb.

absolute8511 avatar absolute8511 commented on June 27, 2024

深翻页用zrangebyscore, ZRANGEBYLEX会更快. zrange你那个测试用法相当于深翻页了. 你一个zset里面放这么多members, 几个不同的大zset加起来 redis内存也抗不住啊.

from zanredisdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.