New answers tagged

-2

I believe completely wiping out the data and doing an insert would be faster. As each update would require a DB scan to find the matching record and update it.


6

They're not redundant, no. Each statistics object includes a histogram of the values stored in the first listed column. For the remaining columns, only density information is kept at each level (no histogram). For example, the proposed statistic on (ClassID, SegmentID, GroupID, Tier1, LanguageID, Active) would create: A histogram for ClassID values A ...


8

You can use a join to create and populate the new table in one go: SELECT t.* INTO dbo.NewTable FROM dbo.TableWithIdentity AS t LEFT JOIN dbo.TableWithIdentity ON 1 = 0 ; Because of the 1 = 0 condition, the right side will have no matches and thus prevent duplication of the left side rows, and because this is an outer join, the left side rows will ...


4

Please note that a computer generating a list of "missing indexes" should not be swallowed whole. You will still need to decide which indexes to create, which recommended indexes are near duplicates of existing indexes, and how you should want to handle those issues. It still requires you making a decision since the generated recommendations need some ...


7

Check the View Tuning Output: If you want to save all of the Transact-SQL scripts that create or drop all database objects in this recommendation into one script file, click Save Recommendations on the Actions menu. As always review and test the recommendations before blindly applying them to your PROD environment. I would highly suggest to look ...


2

a significant part of sql server process memory has been paged out Let me explain you what this message means. This means SQL Server process was paged to disk because the OS or applications running on OS requested memory and OS could not find continuous chunk of it so paged SQL Server to disk, temporarily, and provided the physical memory to the process ...


6

How come I have so many statistics to create, since my database has auto create stats on? Automatic statistics can only create single column statistics objects. The statistics suggested by DTA are all multi-column statistics that capture potentially-useful (though limited) correlation information. For details see the Statistics documentation. How ...



Top 50 recent answers are included