I am trying to understand the tempDB
and following are the doubts popping in my mind.
- What is the lifetime of data in
tempDB
? Say a query is doing someOrder By
and usestempDB
for performing that. After this query finishes, someone else also executes a query which utilizes thetempDB
. Will the second query find records written by first query in thetempDB
or will they be deleted? - Are there any visible tables created inside the
tempDB
by the Sql Engine? How can I know which temporary table is created because of this query? Is there any naming convention followed by the Sql engine for naming these temporary tables?
I am new to tempDB
so please pardon me for asking such silly (if at all) questions :-)
It will be very nice if someone can point me to a good resource which can help me learn about tempDB.