Solved

SHRINK DATA FILE(mdf and log files)

Posted on 2003-11-22
4
966 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
  • 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 30 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

773 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