also who does not order by created_at, and I forgot to mention the “updates log”: this basically allows anything to subscribe to deletions/insertions on the relay as a log and act on it

Replies (1)

fiatjaf's eventstore is designed in mind to fling events out of the database as soon as they are found. idk about the other implementations aside from badger but he depends on event store sequence numbers for ordering. orly has an index for taking event serials and sorting them by created_at, filtering out authors, and cutting a since/until out of the result set. once it does that it fetches the binary, decodes, encodes to json and puts it on the wire. probably the networked database engine drivers he wrote return sorted results but that's all on the RDB engines it uses. hm i better check this part of these two new graph database drivers i wrote. graph dbs require a different scheme for searches using graph traversal, so that pubkey/kind/created at index i made for sorting events before fetching them to decode probably isn't optimal.