Post B0m0OSw1avDDldyCUS by hyc@mastodon.social
 (DIR) More posts by hyc@mastodon.social
 (DIR) Post #B0m0OSw1avDDldyCUS by hyc@mastodon.social
       2025-11-30T08:51:47Z
       
       0 likes, 0 repeats
       
       Hm, this comment from 88 days ago is showing in my google alert as 2 days old. Google is srsly messed up.https://news.ycombinator.com/item?id=45101592But as to the question: #LMDB doesn't store counts of child nodes in each parent page. Doing so would certainly allow for setting a cursor directly to an Nth record, and redhat even submitted a ticket requesting this feature but it didn't seem important enough at the time, and seemed like too much storage cost for a rarely used function.
       
 (DIR) Post #B0m0OUQY2vDqObG5ho by Archivist@social.linux.pizza
       2025-11-30T14:03:30Z
       
       0 likes, 0 repeats
       
       @hyc mmmh, maybe storing the number of records that exist below a page would be a trade-off. It would be tremendously slower still than storing the number of records in each sub-page, but it would make, for example, getting the median of a set much faster. I don't know how good or it would be, but the size cost would be much more reasonable than storing the count for each link