select * from sys.objects where object_id = 101 select * from sys.objects name = 'sysobjects' The query hash is computed from the tree structure produced during compilation. Whitespace is ignored, as are differences in the use of explicit column lists compared to using an asterisk (*) in the SELECT list. Furthermore, it does not matter if one query uses fully qualified name and another uses just the table name as long as they both refer to the same object. All of the following should produce the same query_hash value. Use AdventureWorks Go set showplan_xml on go -- Assume this is run by a user whose default schema is Sales select * from SalesOrderHeader h select * from Sales.SalesOrderHeader h select SalesOrderID, RevisionNumber, OrderDate, DueDate, ShipDate, Status, OnlineOrderFlag, SalesOrderNumber, PurchaseOrderNumber, AccountNumber,
select * from sys.objects where object_id = 101 select * from sys.objects name = 'sysobjects' The query hash is computed from the tree structure produced during compilation. Whitespace is ignored, as are differences in the use of explicit column lists compared to using an asterisk (*) in the SELECT list. Furthermore, it does not matter if one query uses fully qualified name and another uses just the table name as long as they both refer to the same object. All of the following should produce the same query_hash value. Use AdventureWorks Go set showplan_xml on go -- Assume this is run by a user whose default schema is Sales select * from SalesOrderHeader h select * from Sales.SalesOrderHeader h select SalesOrderID, RevisionNumber, OrderDate, DueDate, ShipDate, Status, OnlineOrderFlag, SalesOrderNumber, PurchaseOrderNumber, AccountNumber,
TShootPerfProbs2008.docx