Spatial performance improvements in SQL Server 2012 and 2014

Applies to: SQL Server 2012 EnterpriseSQL Server 2012 DeveloperSQL Server 2012 Standard


This update improves performance of query operations with spatial data types in SQL Server 2012 and 2014. The performance gain will vary, depending on the configuration, the types of queries, and the objects.

Note This performance gain will be noticeable after you enable trace flags 6532, 6533, and 6534. These are per-session flags, but they can be enabled globally.

Known issue:
The STRelate and STAsBinary functions may return unexpected results when trace flag 6533 is enabled. Do not use this trace flag if your workload involves either of these functions. This issue will be fixed in the next cumulative update for SQL Server 2012 SP3.


This functionality was first introduced in the following Service Packs for SQL Server.

For more information about SQL Server 2012 Service Pack 3 (SP3), see bugs that are fixed in SQL Server 2012 Service Pack 3 .

About Service packs for SQL Server

Service packs are cumulative. Each new service pack contains all the fixes that are in previous service packs, together with any new fixes. Our recommendation is to apply the latest service pack and the latest cumulative update for that service pack. You do not have to install a previous service pack before you install the latest service pack. Use Table 1 in the following article for finding more information about the latest service pack and latest cumulative update.

How to determine the version, edition and update level of SQL Server and its components


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.