SQL Server Tempdb is used to store temporary objects. By default the initial size of the tempdb is too small for a production database engaged in any significant enterprise activities, therefore it should be sized accordingly on setup.
Failure to do so will have a negative performance impact when the database is first put into operation as it will need to grow to a more fitting size. Worse still, every time SQL Server is restarted the tempdb will be recreated with its initial size. So SQL Server has to initiate autogrowth steps to grow the database file again and performance will be impacted negatively while it grows.
To compare the initial tempdb size to the current size run the script below.
USE master; GO SELECT mf.database_id ,mf.NAME ,mf.size * 8 / 1024 AS Initial_Size ,df.size * 8 / 1024 AS Current_Size FROM sys.master_files mf /*adding info about current file size*/ INNER JOIN tempdb.sys.database_files df ON mf.NAME = df.NAME /*filtering for tempdb only*/ WHERE mf.database_id = 2; GO
USE master; GO ALTER DATABASE TempDB MODIFY FILE ( NAME = [logical file name of the tempdb data file] ,SIZE = [value] MB ); GO
USE master; GO ALTER DATABASE TempDB MODIFY FILE ( NAME = [tempdev] ,SIZE = 4 MB ); GO ALTER DATABASE TempDB MODIFY FILE ( NAME = [templog] ,SIZE = 3 MB ); GO