I've tried using negentropy for sync between local database and relay like damus for lume, then only query directly from database. Everything work like a charm and extremly fast. https://github.com/lumehq/lume/releases/tag/v4.3.0