So many potential reasons, but I'll ask this:
A lot of people test with SSMS will be using it on the machine where SQL is installed, which could be in your local server room. But ArcGIS Enterprise 'could' be in the cloud, and in a completely different physical location.
Do you know the physical locations of your database and application servers?
The impacts of bandwidth and latency can have a drastic impact on performance, so we need to rule that out.
Scott Tansley
https://www.linkedin.com/in/scotttansley/