When I have two indexed inputs in an emitted event, the Ethereum logs index the pair or just each one separately?
I mean, if I want to filter event logs using two topics, then that get's the information directly from an index of the pair, or first an intersection of the two topics results is computed?
Example:
event MyEvent(address indexed account, uint256 indexed selectedNumber);
When I want to filter by account and selectedNumber, then the events for the pair are indexed already and directly returned, or the Node has to get the indexed events for account first, the ones for selectedNumber second, and intersect the result?
I'm curious to understand if they are optimizing storage or query speed.