Viewing 15 posts - 2,071 through 2,085 (of 6,036 total)
David Webb-200187 (3/18/2013)
A common table expression can be thought of as a temporary result set that is defined within the execution scope of a single SELECT, INSERT,...
March 18, 2013 at 5:57 pm
Eugene Elutin (3/18/2013)
First of all it's not quite polite to put statements in foreign language on English forum without translation. So, here we are:
As you pointed out this proverb does...
March 18, 2013 at 5:56 pm
Sean Lange (3/18/2013)
Yes I don't think there is a clear cut advantage for either approach as far as performance is concerned. I think it boils down to preference.
If you come...
March 18, 2013 at 4:25 pm
Another one:
I have some questions about it, though.
Will do some excersises around it, when have some spare time.
March 18, 2013 at 4:15 pm
Sean Lange (3/18/2013)
Of course a CTE can use tempdb. Just like a temp table, if the memory pressure is too much it will absolutely start writing data to tempdb.
What would...
March 18, 2013 at 4:06 pm
Lynn Pettis (3/18/2013)
So a derived table in a FROM clause would have the same problem, wouldn't it.It would seem that a view would also have the same issue as well.
Definitely...
March 18, 2013 at 3:21 pm
Sean Lange (3/18/2013)
Of course a CTE can use tempdb. Just like a temp table, if the memory pressure is too much it will absolutely start writing data to tempdb.
Hmm...
I saw...
March 18, 2013 at 3:18 pm
Sean Lange (3/18/2013)
March 18, 2013 at 2:54 pm
Eugene Elutin (3/18/2013)
:w00t::w00t::w00t::w00t::w00t:"extra words" is a greatest argument to declare a "code" winner I'have ever seen.
Did you find anything else different?
Anything?
If you missed it - I responded on this statement:
Lynn...
March 18, 2013 at 12:48 pm
AllanP999 (3/15/2013)
Phil's solution sorted it out thanks
So, your answer on my question was not correct:
So the answer to your question is I am only interested in rows 1-13 and not...
March 17, 2013 at 8:01 pm
Lynn Pettis (3/17/2013)
So, does the extra typing make it more complex? I think it makes the query more understandable.
Extra typing always makes anything more complex.
By definition.
More typing - more...
March 17, 2013 at 7:43 pm
The plans looks identical.
No difference here.
So, the oonly difference left is in extra wording you need to write every time when you use CTE instead of a simple derived table.
😎
March 17, 2013 at 7:21 pm
Lynn Pettis (3/17/2013)
Really, CTEs are complex? I find them to make writing queries easier as you don't have to write derived tables.
🙂
Let's compare:
;WITH MyData AS (
...
March 17, 2013 at 6:53 pm
I guess a query WITH ROLLUP would allow avoiding double-run.
Then a row with grouping on YEAR column would contain aggregated values from all rows with grouping on month.
March 14, 2013 at 5:26 pm
Grant Fritchey (3/13/2013)
March 13, 2013 at 7:34 pm
Viewing 15 posts - 2,071 through 2,085 (of 6,036 total)