Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

TempDB Expand / Collapse
Author
Message
Posted Wednesday, April 1, 2009 8:56 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, May 31, 2009 10:19 AM
Points: 103, 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
Post #688031
Posted Wednesday, April 1, 2009 9:16 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 24, 2012 8:11 AM
Points: 1,097, Visits: 2,157
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

Post #688064
Posted Wednesday, April 1, 2009 9:24 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Sunday, May 31, 2009 10:19 AM
Points: 103, Visits: 982
this is supposing you have the files of tempdb on the same disc conditions as the user databases.
Post #688083
Posted Wednesday, April 1, 2009 9:30 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 3:00 AM
Points: 42,774, Visits: 35,871
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 2008, MVP
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

Post #688095
Posted Wednesday, April 1, 2009 9:35 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 3:06 PM
Points: 33,169, Visits: 15,304
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
Post #688102
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse