In Iota, addresses are defined by an incremental index from 0 to 2,147,483,647 (potentially infinite depending on the IRI implementation).
For the sake of the example, let's say the last address you used was at index 1,000,000
In order to get the balance of a seed, you'd need to query all transactions referencing addresses from index 0 to index 1,000,000.
Even with efficient algorithms such as MapReduce, that seems like a heavy operation on a database + computation for such a simple request.
- Is the premise correct ?
- If correct, is there a mechanism to limit the weight of the operation ?
- Overall, how will large address indexes affect scalability in the long run ?