Edit the size of TempDB and change the server memory

Use at your own risk!

Alter the size of TempDB on SQL:

ALTER DATABASE tempdb
MODIFY FILE (NAME=templog , FILENAME ='E:\TCLOG\templog.ldf', SIZE=2500);
GO

ALTER DATABASE tempdb
MODIFY FILE (NAME=tempdev , FILENAME ='D:\TCDATA\tempdb.mdf', SIZE=5000);
GO

ALTER DATABASE tempdb
MODIFY FILE (NAME=temp2 , FILENAME ='D:\TCDATA\tempdb_mssql_2.ndf', SIZE=5000);
GO

Change the server memory on SQL.
(use this to set the correct min/max memory to your server RAM)
Caution: Never go up to 100%, otherwise your system is slowing down.

exec sp_configure 'show advanced options',1
RECONFIGURE 
GO

exec sp_configure 'min server memory',8192 -- with 16GB RAM = 8192, with 32GB RAM = 16384 
RECONFIGURE
GO

exec sp_configure 'max server memory',12288 -- with 16GB RAM = 12288, with 32GB RAM = 25600 
RECONFIGURE
GO