r/SQLServer • u/aminmashayekhi • Nov 25 '25
Discussion Ever since upgrading the database to SQL Server 2025, queries have been running noticeably slower.
After upgrading my SQL Server from versions 2014 and 2022 to 2025, I noticed a significant slowdown in query performance. This only happens when using SQL Server Authentication, but if I add Trusted_Connection=True, the queries run at normal speed; without it, they become very slow.
28
Upvotes
2
u/aminmashayekhi Nov 27 '25
As I mentioned before, everything works fine with Windows Authentication, but the problem occurs when I use SQL Server Authentication.
8
u/InternDBA Nov 25 '25
trusted connection will use the windows user account of the client instead of sql auth account.
could you have a resource governor enabled for the sql auth account in question?
removing the account issue, you’ve jumped a considerable number of major versions including vast changes to the optimizer within the engine. i’d start reviewing query plans to determine if the executions are different and if so, review why.
10
u/dbrownems Microsoft Employee Nov 25 '25
Did you follow this guidance for using Database Compatibility Levels and the Query Store during the upgrade?
https://learn.microsoft.com/en-us/sql/database-engine/install-windows/change-the-database-compatibility-mode-and-use-the-query-store?view=sql-server-ver17
It’s there to identify and mitigate query perf regressions on upgrades.
4
u/Caranten Nov 25 '25
The engine has changed a lot since 2014. Did you change anything to the compatibility mode?
3
u/muaddba 1 Nov 26 '25
You need to establish exactly what, besides duration, is changing in order to resolve this issue.
I am not sure if you're a DBA with full rights to the DB or just a user. If you're just a user, it's going to be a little harder for you since you may not have access to the metrics you need. Ask your DBA for a little h elp in tracking the difference in query performance with SQL vs windows auth, and they should be able to use things like the Query Store, as mentioned, to find your query and review not only the execution plans but the CPU, IO, Memory, etc used by each version.
There are so many possible issues it could be that it's hard to troubleshoot what may seem on its face to be a very simple question.
I'm a consultant and I'd be happy to set up a free 30-minute consult with you, your DBA, and whoever else might be in control of this recently upgraded server and see if we can work it out. If you have figured it out in the meantime, please post back here and let us know!
2
u/Naive_Moose_6359 Nov 25 '25
Maybe look at the query store to see what is slower?
2
u/First-Butterscotch-3 Nov 25 '25
Sounds more connection based as it runs ok when you use ssms certifcare
Check query store and or dmv, or at a pinch set statistics time on and compare cpu/client time
1
u/HospitalVivid5358 Dec 12 '25
Hello,
I’m having exactly the same issue: I’ve just installed SQL Server 2025, created a database, and installed my software, which uses an SQL login to initialize the database (default values, table creation, etc.). This process took 5 hours on SQL 2025. Then I changed my connection string to use Windows authentication, and the database was initialized in 30 minutes. There’s clearly a real problem with SQL authentication.
1
u/FishGiant Apr 11 '26
The first thing I look at is what the database is waiting on (wait stats / wait events depending on the platform). That tells you why the query is slow before you even look at the plan. Then I go into the execution plan to confirm where that bottleneck is happening. Most slow queries aren’t “mysterious” they’re just doing way more work than they need to. If you have a specific query feel free to share it via DM. I can usually pinpoint the issue pretty quickly.
-1
u/chandleya Nov 25 '25
Going from 2014 straight to 2025 is kind of crazy.
Are your QUERIES slow or are your connections slow? 2025 requires TLS on connect and with a self-signed cert, that could be tripping up your client.
But yeah, let’s see some query plans and evidence. Happenstance “it’s slow” is like a bad certification quiz.
-1
u/alinroc 4 Nov 25 '25
This is in a non-production environment, right?
....right?
0
u/Lost_Term_8080 Nov 25 '25
Read the SQL Server release notes. A new hashing algorithm was implemented in SQL 2025. Given that you were running on 2014, I assume your servers are also extremely old. The SQL auth algorithm may be more than the server can handle performantly.
5
u/FishBones83 Nov 25 '25
I assume you compared actual execution plans to see the difference?