sql-server-performance

Using GUIDs in Primary Keys / Clusted Indexes

主宰稳场 提交于 2019-11-30 03:51:43
问题 I'm fairly well versed in SQL server performace but I constanly have to argue down the idea that GUIDs should be used as the default type for Clusterd Primary Keys. Assuming that the table has a fairly low amount of inserts per day (5000 +/- rows / day), what kind of performace issues could we run into? How will page splits affect our seek performance? How often should I reindex (or should I defrag)? What should I set the fill factors to (100, 90, 80, ect)? What if I were inserting 1,000,000

Are there any way to programmatically execute a query with Include Actual Execution Plan and see whether any index suggestion or not

牧云@^-^@ 提交于 2019-11-28 12:37:33
I have a quite good number of queries and i want to test each of them with Include Actual Execution Plan feature on sql server management studio However it is not possible for me to do this manually for 1m + queries So i wonder can i execute them programmatically (from c#) with Include Actual Execution Plan feature and see whether SQL server suggests any index or not Scott Chamberlain First, before I go in to how to get the Actual Execution Plan in code and find the ones that report needing indexes I would recommend you look in to using the Database Engine Tuning Adviser (DTA) , you can feed