Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


TempDB


TempDB

Author
Message
pedro.ribeiro
pedro.ribeiro
SSC-Enthusiastic
SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)

Group: General Forum Members
Points: 107 Visits: 982
Hi masters,

I'm thinking in putting some staging tables on tempdb.
This are empty tables that receive some data from a bulk insert and then i make same validations to this data and insert it on my real tables on my user databases.

I have some question about tempdb, maybe you can help me.


1) TempDB is all reconstructed every time the server (SQL Server) Starts, correct?
2) If the answer to the first question, is yes, this means that the stating tables that i have created the last time on tempdb , now (that the server restarted) are lost and i have to create them again. Correct?

Do you know if you lose perfomance when inserting (from a bulk_insert) data to a staging table on a tempdb Vs on a staging table in a user db?


tks,

Pedro
maechismo_8514
maechismo_8514
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1108 Visits: 2228
pedro.ribeiro (4/1/2009)


1) TempDB is all reconstructed every time the server (SQL Server) Starts, correct?

Correct

2) If the answer to the first question, is yes, this means that the stating tables that i have created the last time on tempdb , now (that the server restarted) are lost and i have to create them again. Correct?

Correct

Do you know if you lose perfomance when inserting (from a bulk_insert) data to a staging table on a tempdb Vs on a staging table in a user db?

Humm.. I am not so sure but may be it depends on your disk configuration? not sure though
pedro.ribeiro
pedro.ribeiro
SSC-Enthusiastic
SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)

Group: General Forum Members
Points: 107 Visits: 982
this is supposing you have the files of tempdb on the same disc conditions as the user databases.
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47351 Visits: 44392
pedro.ribeiro (4/1/2009)
Hi masters,

I'm thinking in putting some staging tables on tempdb.
This are empty tables that receive some data from a bulk insert and then i make same validations to this data and insert it on my real tables on my user databases.


Don't. TempDB is for temp tables and other temporary objects. Either create a staging database and put your tables in there or put them in the same database as the final tables are in.


Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Steve Jones
Steve Jones
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: Administrators
Points: 36266 Visits: 18752
I'm with Gail, don't put staging tables in there.

Create another filegroup on a new disk, or a new database to hold staging data. Tempdb is for temp working space that SQL needs, not you.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search