From: tshad on 17 Mar 2010 21:59 I ran the Engine Tuning on my Tuning trace for a page that is a little slow. It seemed that indexes were fine but was still a bit slow. The Recommenations are only to create statistics, 2 on one table and 7 on another table. When I put my mouse over the Target of Recomendation, I get something like: *********************************** Update New Statistics [MarginID], [CustomerID] *********************************** *********************************** Update New Statistics [Orders],[MarginID], [CustomerID] ************************************ So I would do something like: CREATE STATISTIC CustomerOrdersMarginIDCustomerID ON CustomerOrders (MarginID, CustomerID) and CREATE STATISTIC CustomerOrdersMarginIDCustomerID ON CustomerOrders (Orders,MarginID, CustomerID) So if I add these statistics, do I need to update statistics as well or does it do it as I Create them. Also, are they updated as new changes are made to the tables or do you need to run UPDATE STATISTICS to update them. Some of the write ups I saw said you shouldn't do it too often because when you do, all the stored procedures would be recompiled. Also, there are a few _WA_SYS_... object which are Auto Created Statistics. And none of them are these. Why did it create the others and not these? If I create all the new ones, is this going to slow the system down? Is there any downside to creating them - just because DTA suggested it? Thanks, Tom
|
Pages: 1 Prev: Help on UPDATE from a novice Next: Weekending - grouping by the week |