?
Solved

SHRINK DATA FILE(mdf and log files)

Posted on 2003-11-22
4
Medium Priority
?
986 Views
Last Modified: 2007-12-19
I am shrinking the temp_db file from 30GB. I want to know what effect it can make to my performance. Bascally i need to know why temp_db is used and  why so much space was alloctated to it initalliy. Some ex-dba has done that.

0
Comment
Question by:pg_india
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 34

Expert Comment

by:arbert
ID: 9803801
Temp_Db is used whenever temporary tables are created or whenever someone does large sorts.  Everytime you restart SQL Server tempdb is recreated, but it doesn't hurt to shrink it once in a while if you don't restart the server that often.

Of course, any time you shrink ANY database, it does have an affect on the server because of the extra IO that's involved.

Brett
0
 
LVL 1

Expert Comment

by:yuniar
ID: 9805021
TempDB database size is usually set base on how much space is needed for processing using temporary table. it seems that your setting is too big. you can decrease your tempdb database from SHRINK database option and set file growth to 10% for tempdb database setting
0
 
LVL 3

Author Comment

by:pg_india
ID: 9805361
Thanks you all for your views and experts comments.

I want to know what effect it can make to my performance???
Now that temporary tables are used to store in temp_db shrinking it will make it slower? I mean suppose i have shrinked it After shriking it will reduce the speed of temp_db file??


0
 
LVL 34

Accepted Solution

by:
arbert earned 120 total points
ID: 9806203
You're only going to take a "hit" while the shrink is happening.  You could experience a little bit of lock contention and IO waits.  After the shrink there should be no bad affects (unless for some reason the tempdb has to grow again and then you can get bad performance because of the auto grow and any fragmentation that ocurrs because of it).

Brett
0

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question