<p>Our software must be able to run on SQL Server 2000 and 2005.  To simplify development, we're running our SQL Server 2005 databases in compatibility level 80.  However, database performance seems slower on SQL 2005 than on SQL 2000 in some cases (we have not confirmed this using benchmarks yet).  Would upgrading the compatibility level to 90 improve performance on the SQL 2005 servers?</p>

[{'answer_id': 7241, 'author': 'SQLMenace', 'author_id': 740, 'author_profile': 'https://Stackoverflow.com/users/740', 'pm_score': 2, 'selected': False, 'text': '<p>after you moved the DBs over to 2005 did you</p>\n\n<p>update the stats with full scan?\nrebuilt the indexes?</p>\n\n<p>first try that and then check performance again</p>\n'}, {'answer_id': 7242, 'author': 'SQLMenace', 'author_id': 740, 'author_profile': 'https://Stackoverflow.com/users/740', 'pm_score': 1, 'selected': False, 'text': '<p>Also a FYI, if you run compatibility level 90 then some things are not supported anymore like old style outer joins <code>(*= and =*)</code></p>\n'}, {'answer_id': 33324, 'author': 'Marek Grzenkowicz', 'author_id': 95, 'author_profile': 'https://Stackoverflow.com/users/95', 'pm_score': 1, 'selected': False, 'text': '<p>Are you using <strong>subselects</strong> in your queries?</p>\n\n<p>From my experience, a SELECT statement with subselects that runs fine on SQL Server 2000 can crawl on SQL Server 2005 (it can be like 10x slower!).</p>\n\n<p>Make an experiment - re-write one query to eliminate the subselects and see how its performance changes.</p>\n'}, {'answer_id': 178509, 'author': 'Jan', 'author_id': 25727, 'author_profile': 'https://Stackoverflow.com/users/25727', 'pm_score': 4, 'selected': True, 'text': '<p>I think i read somewhere, that the SQL Server 2005 database engine should be about 30% faster than the SQL Server 2000 engine. It might be, that you have to run your database in compatibility mode 90 to get these benefits.</p>\n\n<p>But i stumbled on two scenarios, where performance can drop dramatically when using mssql 2005 compared to mssql 2000:</p>\n\n<ol>\n<li><p>Parameter Sniffing: When using a stored procedure, sql server will calculate exactly one execution plan at the time, you first call the procedure. The execution plan depends on the parameter values given for that call. In our case, procedures which normally took about 10 seconds are running for hours under mssql 2005. Take a look <a href="http://furrukhbaig.wordpress.com/category/parameter-sniffing/" rel="noreferrer">here</a> and <a href="http://www.microsoft.com/technet/prodtechnol/sql/2005/qrystats.mspx" rel="noreferrer">here</a>.</p></li>\n<li><p>When using distributed queries, mssql 2005 behaves different concerning assumptions about the sort order on the remote server. Default behavior is, that the server copies the whole remote tables involved in a query to the local tempdb and then execute the joins locally. Workaround is to use OPENQUERY, where you can control exactly which resultset is transferred from the remote server.</p></li>\n</ol>\n'}]
['https://Stackoverflow.com/questions/7237', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/799/']