Re: use of tempdb by union all
From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 03/23/04
- Next message: Tom Furness: "Re: Query help needed"
- Previous message: SFRATTURA: "select statement as a column"
- In reply to: Tenaya: "Re: use of tempdb by union all"
- Next in thread: Tenaya: "Re: use of tempdb by union all"
- Reply: Tenaya: "Re: use of tempdb by union all"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 23 Mar 2004 15:43:00 +0100
Chief,
> Apologies for "reviving" this thread once again
N problem.
> BTW, I trust that both you and Andrew recognize that precision in wording
is
> necessary, since otherwise people may jump to incorrect conclusions.
I have no problems with trying to be precise, au contraire. That is why I
posted in the first place in this thread. :-)
Yes, there are special situation where space inside the user database are
used as a "scratch area". (Re)creating indexes is such a case, and a recent
enhancement to SQL Server is that we can specify tempdb to be used for this.
I suppose that there might be other cases as well, although I can't think of
any at the moment.
It all boils down to the interpretation of the original question. SQL Server
will not use space from the user database for normal query processing (work
tables used as intermediate steps as the query is processed). There is at
least one special situation where SQL Server will use space inside the user
database as a type of work-area, and that is index (re)builds.
Is above OK? :-)
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp "Tenaya" <ct@ct.ct> wrote in message news:uYNb7sNEEHA.700@TK2MSFTNGP09.phx.gbl... > Tibor, > > Apologies for "reviving" this thread once again, but I got to thinking a bit > more about your statement, and I'm now inclined to think that the statement > that "SQL will not allocate 'scratch space' from the user database" might be > misleading. > > Earlier in this thread, I referenced the BOL section "tempdb and Index > Creation", and I'd draw your attention to that article again. As I read it, > SQL Server will indeed allocate "scratch space" from the user database, > since otherwise it seems to me that the article makes little sense. > > I will certainly readily admit that the statement that drew your attention > in my posting was at best imprecise, and, quite conceivably, completely > wrong. Certainly one can argue that I was saying that if SQL Server needs > "scratch" disk space within the user database, and is unable to allocate the > space, that SQL Server will then automatically take the necessary "scratch" > disk space from the tempdb database. That is, I admit, completely wrong. > > However, I think that without some qualification, your posting can be > construed as misleading. > > BTW, I trust that both you and Andrew recognize that precision in wording is > necessary, since otherwise people may jump to incorrect conclusions. > > Chief Tenaya > > > "Tibor Karaszi" <tibor_please.no.email_karaszi@hotmail.nomail.com> wrote in > message news:ehywMdEEEHA.1228@TK2MSFTNGP11.phx.gbl... > > > It was my impression that the tempdb database will be used when SQL > Server > > > has insufficient memory / disk space to carry out the operation in the > > > current database ... i.e., the one in which the operation was "launched" > > > (via the USE command, either implicitly or explicitly). > > > > SQL Server will not allocate "scratch space" from the user database. If > such > > is needed, it is allocated in tempdb. > > > > -- > > Tibor Karaszi, SQL Server MVP > > http://www.karaszi.com/sqlserver/default.asp > > > > > >
- Next message: Tom Furness: "Re: Query help needed"
- Previous message: SFRATTURA: "select statement as a column"
- In reply to: Tenaya: "Re: use of tempdb by union all"
- Next in thread: Tenaya: "Re: use of tempdb by union all"
- Reply: Tenaya: "Re: use of tempdb by union all"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|