Also, do you have an multi-column index on (kind, pubkey) as a pair? It may sound superfluous but it is faster than having two separate indexes (which you still need however). Because under the hood the data is laid out in such an index like this: kind1,author1 -> offsets of events kind1,author2 -> offsets of events kind1,author3 -> offsets of events kind2, author1 -> offsets of events ... and it can jump to the matching kind and author in one fell swoop without doing a hashjoin (for example).
I do. I ran into the same thing. Here's my schema: https://image.nostr.build/87e21d98e38cfc97f96f04fc0abb7688958fc273ab6d7c61f4bdd0655d7f6f40.png
I have a thorough benchmark too: https://image.nostr.build/9d62cc358e9d862a3dd78e10ee3a221dc89a672a6ac33536efcf032bbd1e27b9.png