w3c / IndexedDB

Indexed Database API
https://w3c.github.io/IndexedDB/
Other
240 stars 62 forks source link

Range bytes counts and keys count #368

Open amirouche opened 2 years ago

amirouche commented 2 years ago

It will be useful to have:

  1. Count of bytes: a. The count of bytes in keys in a given range b. The count of bytes in key-value pairs in a given range
  2. The count of keys in given range

That allows to control how much memory will be used (e.g. slice transactions into manageable ranges), but also avoid the need to implement statistics at user level, to be able to optimize query plans.

amirouche commented 2 years ago

Having estimates instead of exact value could be enough.