nostrdb is super optimized for ingesting and storing lots of notes. It’s not really a big deal. Things are incrementally updated and cached.
We also have an embedded local note search. We’re making it to be offline first. we try not to rely on or trust any external third party services, especially for things as important as web of trust calculations.