AlwaysOn read only replica slower then prime I’m running into an issue. My readOnly replica (on Node B) takes twice as long to execute a query as on my primary (Node A).
But when I fail over to Node B (which becomes my primary) it runs fine, but then it runs slow on the new replica so I don't think its the hardware.

I checked the index fragmentation and they are identical and there is currently nothing running on the servers except my query. 
Execution Plans are identical. 
The power is set to High Performance.

We are running SQL 2017 on windows 2016 server.

Any suggestions on what else to check?
To fix our problem we had to enable Trace Flag 3459. 

We are currently having this issue on SQL Server 2017 CU6 (14.0.3025.34). Not much documentation on this Flag, but from what I gather, enabling this flag will slow down our failover process. I'm going to test some more, and update if i run into anything show stoppers.