Re: tempdb mdf and ldf placement

From: Rick Sawtell (quickening_at_msn.com)
Date: 12/10/04


Date: Fri, 10 Dec 2004 14:45:09 -0600


"Kelly F." <anonymous@discussions.microsoft.com> wrote in message
news:2d8301c4def6$ba9d2b40$a301280a@phx.gbl...
>I believe tempdb should be on its own set of hard drives,
> meaning not with other sqlserver.exe and not with the MDF
> or LDF files from user or system databases. Since it
> remains in simple recovery mode, is it important to split
> the tempdb MDF and LDF to separate hard drives or can they
> be on the same hard drive (raid array) together?
>
> Kelly

It depends. <My favorite database answer>

The short answer is: Treat it like you would any other user database that
uses simple recovery mode.

The long answer is:
To really answer this question, you need to look at what tempdb is used for.
Primarily it is a working storage area for queries, reindexing and temp
tables. Depending on the size of your databases, the amount of and size of
your indexes and how large your queries are etc, should give you some
direction on how to handle the placement of the tempdb database.

If it has a LOT of activity, then a RAID 0 might be your best choice. Keep
in mind that tempdb is rebuilt every time SQL Server restarts. If there is
not a ton of activity and you have relatively small databases and indexes
etc., running it on a regular NTFS partition on your system partition (C:\)
may be appropriate. That of course depends on what else your O/S is doing
on that computer.

For moderate sized databases, I only see minor problems putting it on a RAID
5 controller. The extra time and loss of storage space required by RAID 5
for a database that is as dynamic as the tempdb may outweigh it's benefits.

Rick Sawtell
MCT, MCSD, MCDBA



Relevant Pages

  • Re: SQL Server disk configuration
    ... For instance, in my current project, I use 6 disks for TEMPDB and 4 disks for DATA file. ... It's only you who has a chance to observe the transactions work against your databases so it's you who can determine the needs of the business. ... Can anyone give me a good raid configuration to use. ...
    (microsoft.public.sqlserver.setup)
  • Re: Migrating to new hardward
    ... Moving SQL Server databases to a new location with Detach/Attach ... There is a specific section on moving tempdb. ... recreating the clustered index and specifying a filegroup for the new table. ...
    (microsoft.public.sqlserver.setup)
  • Re: raid question
    ... > what is the ideal RAID level for tempdb? ... then put its data and log files with the other data ... All the databases on the same RAID array, ...
    (microsoft.public.sqlserver.server)
  • Re: Moving tempdb
    ... there are two databases on the server that are being used. ... I also have another server running a database about 16GB in size. ... I'm planning on moving our tempdb to it's own LUN but I'm not sure what ...
    (microsoft.public.sqlserver.setup)
  • Re: Checkpointing Not Happening in Simple Recovery Model
    ... I am looking at databases set to simple: ... > Columnist, SQL Server Professional ... >> She says that she has simple recovery and that one of them is tempdb. ... >> Yes, you are right, I read that Michelle is writing about logs not log, ...
    (microsoft.public.sqlserver.server)