Why Nostr? What is Njump?
2025-02-09 15:20:56
in reply to

Jay on Nostr: I'd need to run it myself but it seems a bit slow. Do you have indexes on ...

I'd need to run it myself but it seems a bit slow. Do you have indexes on NostrUser.pubkey and the NostrEvent.event_id? Whatever properties you use often in your queries should have indexes. This will make it so that when you have a new event, the database doesn't need to query every author. It will also help to put a uniqueness constraint on NostrUser pubkeys.

Also, you dont need the 'author' property if the relationship exists. You'd query a path that contains the author pubkey (or keys) you want and find the event via the relationship or vice versa.
Author Public Key
npub10mtatsat7ph6rsq0w8u8npt8d86x4jfr2nqjnvld2439q6f8ugqq0x27hf