How does can_match functionality work

I'm asking the questions to get a clearer idea of how it works in the background; I may jump directly to the default data stream route.

To confirm, do I need to filter by dataset for each visual in order to get the improved response times or that will be taken care of automatically? Can I use the same index pattern for all of the different datasets and still get the improved response times?