MSTVF Fixed Cardinality Value in SQL Server 2014

In SQL Server 2014 CTP2 in the AdventureWorks2012 database, execute the following batch: The first query uses the legacy cardinality estimator and the second query uses the new cardinality estimator.   Both queries are referencing a multi-statement table valued function. Looking at the plan tree view in SQL Sentry Plan Explorer for the legacy CE plan, […]

March Speaking Engagements

If you’re in the area, just a heads-up that I’ll be speaking at the following events: PASSMN Minnesota SQL Server User GroupLocation:    3601 West 76th Street, Suite 600 Edina, MN 55437Date:    March 18, 2014Time:    4:00 PM – 6:00 PM SQLSaturday #287Location: 6000 American Parkway, Building A, Madison, WI 53783Date: March 29, 2014 Time: My session […]

Using the SQL Server 2014 Database Compatibility Level without the New CE

Consider the following scenario: You want to migrate all databases on a specific SQL Server instance to a new SQL Server 2014 instance You want to leverage new SQL Server 2014 functionality and move to the latest database compatibility level You don’t want to enable the new Cardinality Estimator right away (various reasons why this […]

For the New CE, Database Session Context Matters

Testing on SQL Server 2014, CTP2, version 12.0.1524, imagine you have two databases – one called T1 and one called T2 configured with database compatibility levels as follows: Now with database T1, we know that using a compatibility level of 120 means we’ll be using the new cardinality estimator (CE) – assuming we’re in the […]