Viewing 15 posts - 1,921 through 1,935 (of 59,061 total)
Can we see how "scratch.dbo.DelimitedSplit8K" does the spliting of the string?
Yes. Here's an article that explains how it works and why it's so fast. Don't use the code for...
February 10, 2023 at 4:20 pm
oh god no don't use UNION ALL unless you really need to. Why not just something like this to get all the records you need from each source?
INSERT INTO...
February 10, 2023 at 5:50 am
As I said second option is still used but it's slow. @pietlinden
@jeff Moden: which requires a union all? 😅 , No thx
As opposed to what??? The (in your own...
February 10, 2023 at 5:43 am
Michael, have you seen the movie Idiocracy? If not, just look around. AI is just another way for it to come true.
I hear about how good that movie was...
February 10, 2023 at 12:35 am
I guess you mean selecting them with union all, that's even worse performance wise.
It does.
No... and no where did I come close to even inferring that. I mean use...
February 10, 2023 at 12:31 am
I don't have access to SQL 2022, but I would think that a windowed function would perform much better than the CROSS APPLY.
Really good point on using a Windowing...
February 10, 2023 at 12:15 am
If all the databases are on the same instance, why do you need to use a temporary table?
Also, does your temporary table actually have the correct indexes on it?
February 9, 2023 at 9:02 pm
perfect, thanks
Yes, I'd defined VALUES incorrectly - typing rather than cut and paste
Just to be sure, are you all set now?
February 9, 2023 at 8:08 pm
And thanks for the reminder that I should probably publish the testing I did for that.
In truth, I need to do my own testing on it as well....
February 9, 2023 at 3:37 pm
Nope... not missing those points at all. Those are the points that I'm actually afraid of because the folks that need to use it are going to believe its "correct"...
February 9, 2023 at 3:25 pm
If that's the case, the OP could make use of GENERATE_SERIES as (based on your recent findings, Jeff), it's performant for a single series, which the OP seems to...
February 9, 2023 at 3:14 pm
And, wow... Phil Carter. Were did you ever get off to?
February 9, 2023 at 3:06 pm
Look into LAG.
https://learn.microsoft.com/en-us/sql/t-sql/functions/lag-transact-sql?view=sql-server-ver16
You could also do a "rolling average" using AVG() OVER but it would likely be much more expensive to do it that way.
February 9, 2023 at 3:03 pm
Ok... since SPAM keeps necroing this 2 decade old thread and someone might read it and without knowing what the cursors are actually being used for, I'll just up and...
February 9, 2023 at 3:00 pm
So where do these linked integers come from? Why, for example, is
1linked to1,2, and3, but the numbers8to14only linked to8?
Apparently,...
February 9, 2023 at 2:54 pm
Viewing 15 posts - 1,921 through 1,935 (of 59,061 total)