These two methods are not different from network. The BATCH way can help relays handle events batchly. With the BATCH method, a relay handle hundreds events only need two sql:

select * from event where id in (?, ?, ?, ?).

and the batch insert sql:

insert into event (xxx, xxx) values (?, ?), (?, ?), (?, ?), (?, ?).

If send the event one by one, the relay at lease send hundreds insert sql.

Usually, the batch insert sql is faster the one by one insert sql.

Reply to this note

Please Login to reply.

Discussion

You can fix that on the relay side by just having a small debounced call that accumulates a bunch of received [EVENT, {...}] into a single SQL statement.

This is nicer and much easier than trying to get everybody to implement a new verb.

The debounced way is also ok. But the NIP would be better to state that relay can implement this method and this method is optional.

But the batch way is also optional and need to stated. And it is a way easier to implement.

These two method also can handle hundreds events. I can't find that whick one is better.