I have a query that works after about 2-4 minutes on release, but runs after a couple of seconds on development. Both of these databases are on the same server. (there are no lectures on the developer and production, production is really still in development).
I mean, I can just open two query windows and get two different results in sequence. I launched RedGate SQLCompare and there is no difference in the schemes (indexes, etc.). I disabled the site that connects to the database, so there should be no connections except my Management Studio session.
What could be the reason for this? I create a development database by copying the production (in Studio Management, right-click the database and click "Copy Database")
This is really weird. I do not want to make any index changes, because it is strange that the copy is growing rapidly, but the production is very, very slow, but there must be essentially exact copies.
source
share