SQL Server??????
???????????? ???????[ 2013/4/10 9:57:43 ] ????????
?????????????????????
??????????????????????????????????????????????????????????ν?????????????????????????????????????£???????????????????????????????????????????????????????????????????????????á?
?????????????????ж?????????????????????????????????????????????????ν??????????????м?????????????÷????????????????????????????????????????????DML??????????????????
??????????????????where????ON????г??????????????????????????Щ??????????????е?ν???????????????????????????????????????????????Auto_Create_Statistics?ON????????????????????????
?????????????
???????????£?Auto_Create_Statistics??????????????ON?????????????????????????OFF??
ALTER DATABASE AdventureWorks2012 SET AUTO_CREATE_STATISTICS OFF
GO
ALTER DATABASE AdventureWorks2012 SET AUTO_UPDATE_STATISTICS OFF
GO
?????????????±????????????
SELECT *
INTO SalesOrdDemo
FROM Sales.SalesOrderHeader
GO
???????裺
????1???????±????????????????????????????????????????????
SELECT object_id ??
OBJECT_NAME(object_id) AS TableName ??
name AS StatisticsName ??
auto_created
FROM sys.stats
WHERE object_id = OBJECT_ID('SalesOrdDemo')
ORDER BY object_id DESC
GO
???????????????????????????????????????
????2?????????±??????????????????
CREATE CLUSTERED INDEX idx_SalesOrdDemo_SalesOrderID ON SalesOrdDemo(SalesOrderID)
GO
????3????????в??????????????????????????????????????????????????????м????
SELECT s.salesorderid ??
so.SalesOrderDetailID
FROM salesordDemo AS s
INNER JOIN Sales.SalesOrderDetail AS so ON s.salesorderid = so.SalesOrderID
WHERE s.duedate = '2005-09-19 00:00:00.000'
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11