DEFINITIONS

Definitions More Info.
Definition ID673
TitleSQL
CategoryNOTES
DefinitionCreating a plan guide of type SQL for a stand-alone query
Definition Descriptionhttps://msdn.microsoft.com/en-us/library/ms179880(v=sql.90).aspx The following example creates a plan guide to match a query in a batch submitted by an application that uses the sp_executesql system stored procedure. Here is the batch: SELECT TOP 1 * FROM Sales.SalesOrderHeader ORDER BY OrderDate DESC; To prevent a parallel execution plan from being generated on this query, create the following plan guide: EXEC sp_create_plan_guide @name = N'Guide1', @stmt = N'SELECT TOP 1 * FROM Sales.SalesOrderHeader ORDER BY OrderDate DESC', @type = N'SQL', @module_or_batch = NULL, @params = NULL, @hints = N'OPTION (MAXDOP 1)';
RecordBycunay
Record Date20-10-2015 14:20:36
Düzenle
Kopyala
Sil