Giter Club home page Giter Club logo

Comments (3)

broneill avatar broneill commented on June 15, 2024
  1. Add config option enabling counts for indexes, and at which level. Only level 1 support initially.
  2. Add metadata describing that index supports counts.
  3. Add logic to encode counts in the cursor implementation.
  4. Update cursor skip method to utilize counts.

from tupl.

broneill avatar broneill commented on June 15, 2024

This is an optimization only for the cursor skip operation, and so an implementation is possible without incurring any overhead to anything else. Lazily update the counts, only in the bottom internal nodes. When a leaf node is dirtied, the count field is reset to zero, indicating "unknown". This happens already because the pointers are assumed to be 8 bytes.

The skip operation updates the counts if they are unknown, but it doesn't update the count if the leaf node is dirty. This avoids storing a count which might soon become incorrect. A "known" count is always stored with an offset of 1, allowing for the possibility of empty leaf nodes.

With this design, the skip code is not purely read-only, and optimizations are effective only when skip is run again over the same records. A configuration option can be added to disable skip-updated counting.

from tupl.

broneill avatar broneill commented on June 15, 2024

Change b561cfc

from tupl.

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.