Home All Groups Group Topic Archive Search About

Explain temdb please

Author
27 Oct 2006 4:19 PM
labsRcool@community.nospan
I understand that tempdb is  a "temporary database", but in the real world,
can someone explain:
1)In the real world, when would I use tempdb?
2)Is it imporant that I understand tempdb? - Or is it rarely used?

Author
27 Oct 2006 4:25 PM
Tracy McKibben
labsRcool@community.nospan wrote:
> I understand that tempdb is  a "temporary database", but in the real world,
> can someone explain:
> 1)In the real world, when would I use tempdb?
> 2)Is it imporant that I understand tempdb? - Or is it rarely used?

You typically don't "use" tempdb explicitly, unless you are creating
temp tables.  When you execute a large query that involves extensive
sorting, grouping, etc, SQL has to store that data somewhere as it's
being manipulated, that's where TEMPDB is used.


--
Tracy McKibben
MCDBA
http://www.realsqlguy.com
Are all your drivers up to date? click for free checkup

Author
27 Oct 2006 4:51 PM
labsRcool@community.nospan
Thanks so much!

Show quoteHide quote
"Tracy McKibben" wrote:

> labsRcool@community.nospan wrote:
> > I understand that tempdb is  a "temporary database", but in the real world,
> > can someone explain:
> > 1)In the real world, when would I use tempdb?
> > 2)Is it imporant that I understand tempdb? - Or is it rarely used?
>
> You typically don't "use" tempdb explicitly, unless you are creating
> temp tables.  When you execute a large query that involves extensive
> sorting, grouping, etc, SQL has to store that data somewhere as it's
> being manipulated, that's where TEMPDB is used.
>
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
Author
28 Oct 2006 2:13 PM
John Bell
Hi

Along with Tracey's reply you may want to read what tempdb is used for in
books online see http://msdn2.microsoft.com/en-us/library/ms190768.aspx, the
system may make use of tempdb without you necessarily knowing, and therefore
sizing and the location of tempdb on heavily used system can be very
important http://msdn2.microsoft.com/en-us/library/ms175527.aspx this is even
more important for SQL 2005 where row level versioning can use it, or if you
use notification services use will be made of tempdb
http://msdn2.microsoft.com/en-us/library/ms345368.aspx Overuse of tempdb by
your application may result in contention.

John

Show quoteHide quote
"labsRcool@community.nospan" wrote:

> I understand that tempdb is  a "temporary database", but in the real world,
> can someone explain:
> 1)In the real world, when would I use tempdb?
> 2)Is it imporant that I understand tempdb? - Or is it rarely used?
Author
28 Oct 2006 4:31 PM
labsRcool@community.nospan
Thanks!
I now have a better understanding regarding this.
Those links are very helpful, thanks for your time!

Show quoteHide quote
"John Bell" wrote:

> Hi
>
> Along with Tracey's reply you may want to read what tempdb is used for in
> books online see http://msdn2.microsoft.com/en-us/library/ms190768.aspx, the
> system may make use of tempdb without you necessarily knowing, and therefore
> sizing and the location of tempdb on heavily used system can be very
> important http://msdn2.microsoft.com/en-us/library/ms175527.aspx this is even
> more important for SQL 2005 where row level versioning can use it, or if you
> use notification services use will be made of tempdb
> http://msdn2.microsoft.com/en-us/library/ms345368.aspx Overuse of tempdb by
> your application may result in contention.
>
> John
>
> "labsRcool@community.nospan" wrote:
>
> > I understand that tempdb is  a "temporary database", but in the real world,
> > can someone explain:
> > 1)In the real world, when would I use tempdb?
> > 2)Is it imporant that I understand tempdb? - Or is it rarely used?

Bookmark and Share

Post Thread options