SQL Server 2000 vs SQL Server 2008 Query Performance - sql

I'm working with a client who had a SQL Server 2008 converted from a SQL Server 2000 DB and one of the queries has quite dramatically increased in time since it was on SQL Server 2000.
However, if I change the compatibility level to 2008 in the DB, the query goes like a rocket (40-50 times faster).
The query does use a number of UDFs.
My questions:
- are there issues with running SQL2000 compatibility in SQL Server 2008
- has SQL Server 2008 improved the performance when using UDFs?

There are some other things you might want to do after upgrading. See the "After upgrading..." section here: http://msdn.microsoft.com/en-us/library/bb933942.aspx

Related

SQL Server Migration from 2008 R2 to 2014

We have migrated the database from SQL Server 2008 R2 to SQL Server 2014 with the help of backup/restore method. Now my database in SQL Server 2014 and has compatibility level 100, I didn't change it to 120.
If I change it to 120, will it flush all the query plans? As in SQL Server 2014, Microsoft has rewritten the cardinality estimator. So will it flush the old plan and regenerate the plan according to new cardinality estimator? Can anyone explain this or point to the reference where I can understand it clearly?

SQL Server 2008 - With Clause

In the Oracle database we had extensively used WITH clause in earlier project.
Now we are on SQL Server 2008 database. Do you suggest we can still use the WITH Clause in our SQL codes ? Does SQL Server 2008 support WITH clause ?
I mean does it improve the performance or does using WITH affect query performance in SQL Server 2008 ?
You can read more about it here:
https://learn.microsoft.com/en-us/sql/t-sql/queries/with-common-table-expression-transact-sql
and here:
https://learn.microsoft.com/en-us/sql/t-sql/queries/hints-transact-sql-table
Depending on what it is you were specifically looking at.
Performance is very much dependent on what it is you are doing, you would need to post some examples.

How to check SQL Server 2008 script will work properly on SQL Server 2005

Is there a way (a tool) to check that a SQL Server 2008 script will run on SQL Server 2005?
Open up SQL Management studio, rt mouse click on the database name, select properties, select option, set compatability level. Test. A far as is known, when the compatabailty level is set to a (lower) level, functionality is disabled and errors raised entirely in line with the selected level. MS are a bit relctant to comit http://msdn.microsoft.com/en-gb/library/bb510680.aspx but in practice I've not found any issues. You can of course install an instance of the 2005 build and bulk insert for a really thorough check.
You can use SQL Fiddle for SQL Server 2008
At the left top you can select the RDMS

How to get star query optimization in SQL Server 2005

I have a star schema but SQL Server 2005 always uses the clustered indexes to access a table. What parameters do I have to set to enable this optimization.
According to http://blogs.msdn.com/sqlqueryprocessing/archive/2007/04/09/how-to-check-whether-the-final-query-plan-is-optimized-for-star-join.aspx and the DWH datasheet of SQL Server 2005 both claim, that SQL Server 2005 support this feature.
What edition do you use? IIRC star query optimization is ONLY in the enterprise version of SQL Server 2005.

How to compare DTSs in SQL Server 2005

Once your databases are converted from SQL Server 2000 to SQL Server 2005, is there any way to compare DTSs on two servers to see if they are still essentially the same? I need to see if my dev and prod are the same, and comparing them manually is really time consuming.
If they were still in 2000, I could use the Red-Gate tool DTS Compare, but that doesn't work in 2005. I can save each as a Visual Basic file, and then compare those (and that kind of works), but the steps may be output in a different order. Is there something out there that is better?
I would say, don't use DTS jobs in SQL Server 2005.
There are a complete new and reworked method to do those things: SSIS.
Here you find an introduction:
http://www.accelebrate.com/sql_training/ssis_tutorial.htm
Yes, maybe you can't compare it perfectly, but DTS Jobs are run out of support since SQL 2005 (remember, we are in 2009 :) )