Viewing 15 posts - 6,571 through 6,585 (of 10,143 total)
Do you have results from the three test queries?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 20, 2011 at 3:36 am
adlakha.22 (10/20/2011)
Thanks for Reply ChrisI again Executed the Query , nd did't made any changes except column names to match them with group By Clause,
U can see Execution Plan attached.
How...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 20, 2011 at 2:35 am
Here are three test queries which will give an idea of baseline performance. Query 3 takes 10seconds to run against a similar table of 40 million rows here. Please change...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 20, 2011 at 2:02 am
adlakha.22 (10/20/2011)
@chris-2 i am not able to get that Query3 ,
Every Morning I have a hope with u guys...Expecting some logical magic.
That improve my Query performance and my...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 20, 2011 at 1:37 am
adlakha.22 (10/19/2011)
as u say "so I would prefer apply MAX to ordernumber and group by cono, orderno, ordersuf. That is, focus on the clustering keys."
I again do some changes in...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 19, 2011 at 2:45 am
We've all been there, Rich 😉
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 10:18 am
Put @delim fore n aft to deal with single elements:
SET @DelimitedList = @delim + @DelimitedList + @delim;
Either outside the function or within...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 9:43 am
pvoutov (10/18/2011)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 7:19 am
frfernan (10/18/2011)
Ninja's_RGR'us (10/18/2011)
Just a reminder of the goal of the OP. You guys were not supposed to play with the qry at all! 😀Query Optimization using Indexes
Ha ha,...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 7:03 am
Ninja's_RGR'us (10/18/2011)
Just a reminder of the goal of the OP. You guys were not supposed to play with the qry at all! 😀Query Optimization using Indexes
Couldn't help it...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 6:55 am
adlakha.22 (10/18/2011)
could u plz tell me wht do u mean by
"Now, with the third query removed from your batch, how long does the batch take to run? I'd expect...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 5:54 am
frfernan (10/18/2011)
... But you can join both tables trough the primary keys...
Can you please show what you mean?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 3:23 am
Nice, concise, easily-readable article.
However, I'd change the key query because it reads the prices table twice. This reads it once:
;WITH PriceYearly_CTE2 AS
(SELECT
Period = ROW_NUMBER() OVER (ORDER BY [year]),...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 3:17 am
The plan for the orderlines query looks fine, however there's a third query shown:
insert [#orderlines_________________________________________________________________________________________________________000000000118] select * from [#orderlines_________________________________________________________________________________________________________000000000118]
I don't know where this has come from and you don't need...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 3:01 am
There is of course a cost associated with maintaining an index - another subject.
Here's a few changes. Check out how long it takes to run, then I guess it's the...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
October 18, 2011 at 2:01 am
Viewing 15 posts - 6,571 through 6,585 (of 10,143 total)