What is Nostr?
Alex /
npub1q3s…d26p
2024-07-02 06:28:21
in reply to nevent1q…sv0p

Alex on Nostr: This is a smart idea. I didn't know about EXISTS before. I was hopeful it would work. ...

This is a smart idea. I didn't know about EXISTS before. I was hopeful it would work. But I just tried directly in Postgres and I benched it on SQLite, and in both cases performance is actually worse than the join.

Top is before, bottom is after. The queries with tags are slower with EXISTS. I already had an index on (name, value), and adding one on (event_id, name, value) didn't improve it.

I did "explain analyze" in postgres too. I'm still working through it. I need these tag queries to be faster.

Author Public Key
npub1q3sle0kvfsehgsuexttt3ugjd8xdklxfwwkh559wxckmzddywnws6cd26p