If there are less number of data files in the tempdb then we would have noticed that there could be issue in performance and queries will go for pagelatch_up waitType.
And we need to manually add the data files by checking the number of cores available. Instead of adding manually I found automatic the scirpt completely will help everyone so I came with some script which might help everyone with less knowledge on SQL server database alter commands.
How to add the tempdb data files automatically depending on the number of CPU core count available
1.4k views Asked by Adarsh H D Dev At
1
Please find the complete script which adds the data file to tempdb based on CPU core available. if we have more than 8 cores then the script limits the file addition to 8 data files.