We are working on a Oracle to SQL Server 2008 migration project. So we have lot of oracle package functions which used to call other Stored procedures. These functions have been converted by SSMA to IMPL procedures which are executed via extended procedures from the functions. We had converted most of such functions to simple UDF where ever possible. Now we are facing a peculiar performance problem. The queries invoking such functions with IMPL procedure calls are taking a longer time to run. Whats interesting is that the same queries used to run on old server with Sql Server 2008 in 2 mins. Now in the new server with SQL Server 2008 R2, its taking very long time (around 25-30 mins).
We have verified that the indexes and statistics are also up to date. We also noticed that IMPL calls go though master and sysdb databases and uses internal tables to store and pass the result back from the IMPL procedure call to the function. Their space allocation is different from old server. But they are not running out of space. Can they be causing the problem? Is there any guidelines available for the space allocation of master/sysdb databases?
The databases are of around 300GB and tempdb is around 50GB.
Old Server
- SQL Server 2008 / Windows
- Xenon Quad Core x4 - 3GHz, 64GB RAM
New Server
- SQL Server 2008 R2 RTM
- Opteron 6 core x6 - 2.2GHz, 64GB RAM
Please let me know if any more details are needed.
Thanks