ah, okay you were looking from the relay perspective. Ofc you are right.
In my own SQLite implementation I just use the SELECT COUNT, and it's quite efficient.
Login to reply
Replies (1)
yeah, i build my DB from scratch using a key/value store so such a search index has to be added. it has part of it already but it doesn't cover the full filter query space, only pubkey/id/timestamp. it also needs tags and kinds.
the extra index eliminates the need to decode events by allowing queries to effectively search by those criteria and not sift through such inordinately large volumes of data.
i've chalked in a mental note to implement count properly for the near future, it's not a big task really.