Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • These are all nice hacks, but overall they are too narrow: I want a proper index which provides efficient rank-based operations. The "counting everything" is just an example; if I were to count rows in a range, manually implementing a "count everything" using triggers wouldn't help at all. Commented Jun 23, 2023 at 11:41
  • 1
    You were asking "Is it possible to augment the B-Tree indexes SQLite, MySQL / MariaDB or PostgreSQL use to include counting?" So you shouldn't complain if you get your question answered. Commented Jun 23, 2023 at 11:52
  • @LaurenzAlbe I don't see my question answered by this post, neither positively nor negatively, and my second question isn't touched upon at all. Commented Jun 23, 2023 at 16:15
  • 1
    Also SHOW TABLE STATUS and the equivalent query into information_schema.TABLES. Commented Jun 24, 2023 at 18:02