Hi,
I want to know when does SQL Server use temporary tables for query
processing?
Does it use for all queries or for some complex queries? Or doesn't use at
all?
Thanks
PushkarYes, it does. If you show the query plan, you'll see icons such as Table
Spool/Eager Spool. That implies that a temporary table is being created by
the optimizer behind the scenes.
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
.
"Pushkar" <pushkartiwari@.gmail.com> wrote in message
news:ekuGHMiNGHA.2320@.TK2MSFTNGP11.phx.gbl...
Hi,
I want to know when does SQL Server use temporary tables for query
processing?
Does it use for all queries or for some complex queries? Or doesn't use at
all?
Thanks
Pushkar|||Pushkar
I think SQL Server decides internally to perform some operations in tempdb
database. For sure I know that if your query has ORDER BY ,GROUP BY clauses
and it has to operate in large amount of data , so SQL Server will create a
work tables to perfom that.
I'd suggest to visit at Aaron's web site to get more explanation
www.aspfaq.com
"Pushkar" <pushkartiwari@.gmail.com> wrote in message
news:ekuGHMiNGHA.2320@.TK2MSFTNGP11.phx.gbl...
> Hi,
> I want to know when does SQL Server use temporary tables for query
> processing?
> Does it use for all queries or for some complex queries? Or doesn't use at
> all?
> Thanks
> Pushkar
>|||Thanks !!!
Pushkar
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:urnhSSiNGHA.2916@.tk2msftngp13.phx.gbl...
> Pushkar
> I think SQL Server decides internally to perform some operations in
> tempdb database. For sure I know that if your query has ORDER BY ,GROUP BY
> clauses and it has to operate in large amount of data , so SQL Server will
> create a work tables to perfom that.
> I'd suggest to visit at Aaron's web site to get more explanation
> www.aspfaq.com
>
>
>
> "Pushkar" <pushkartiwari@.gmail.com> wrote in message
> news:ekuGHMiNGHA.2320@.TK2MSFTNGP11.phx.gbl...
>
Showing posts with label complex. Show all posts
Showing posts with label complex. Show all posts
Thursday, March 29, 2012
Thursday, March 22, 2012
Does RS allow querying between tables?
I have a very complex query that needs to return monthly and year-to-date
data. I'm using one table (table A) to correctly return the monthly data. I
would now like to create another table and use a result from table A to
correctly filter and display the year-to-date data along side the monthly
data.
Does RS allow querying between tables?
Example of desired results
Account July 2004 Year-to-Date
Ace Hardware $3000.00 $8452.21
--
DCountYou can't really use table A to display results into a different table. But
what you may want to try is to use the same dataset used in table A to create
a new table B and then on table B goto the properties of the table and then
goto the filters entry there and apply the filters you want to the table.
That should get you the results you're looking for.
> I have a very complex query that needs to return monthly and year-to-date
> data. I'm using one table (table A) to correctly return the monthly data. I
> would now like to create another table and use a result from table A to
> correctly filter and display the year-to-date data along side the monthly
> data.
> Does RS allow querying between tables?
> Example of desired results
> Account July 2004 Year-to-Date
> Ace Hardware $3000.00 $8452.21
>
> --
> DCount
data. I'm using one table (table A) to correctly return the monthly data. I
would now like to create another table and use a result from table A to
correctly filter and display the year-to-date data along side the monthly
data.
Does RS allow querying between tables?
Example of desired results
Account July 2004 Year-to-Date
Ace Hardware $3000.00 $8452.21
--
DCountYou can't really use table A to display results into a different table. But
what you may want to try is to use the same dataset used in table A to create
a new table B and then on table B goto the properties of the table and then
goto the filters entry there and apply the filters you want to the table.
That should get you the results you're looking for.
> I have a very complex query that needs to return monthly and year-to-date
> data. I'm using one table (table A) to correctly return the monthly data. I
> would now like to create another table and use a result from table A to
> correctly filter and display the year-to-date data along side the monthly
> data.
> Does RS allow querying between tables?
> Example of desired results
> Account July 2004 Year-to-Date
> Ace Hardware $3000.00 $8452.21
>
> --
> DCount
Subscribe to:
Posts (Atom)