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.
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.