Viewing 15 posts - 16 through 30 (of 35 total)
Another interesting fact:
If i run just the inner query with distinct i get 54940 rows
Without distinct i get 163508 rows
Im no expert, but from these numbers i suspect there must...
February 7, 2012 at 5:19 am
Ok. Well that explains a lot.
So the natural followup would then be:
What did i do wrong in the second query to get this behaviour. Or how can i change...
February 7, 2012 at 5:16 am
Cadavre (2/7/2012)
In the slow running query, your statistics look out of date (e.g. you have a hash match operator that is estimating 7 rows but the actual number of rows...
February 7, 2012 at 5:03 am
My apologies. Attached you will find the actual executionplans of the slow and fast running query.
February 7, 2012 at 4:36 am
I've added the executionplan of the slow running query
February 7, 2012 at 4:25 am
Thanks for your input.
However i cant see how the blogpost relates to my queries.
The inputed parameters is always provided (never nulls) so there is not much use to use recompile...
February 7, 2012 at 4:22 am
I can describe my problem in detail tomorrow morning if you guys are interested. Maybe you can see an alternative solution that i cant. I know there are lots of...
January 4, 2012 at 7:57 am
Yes i know its not the "vanilla" way to go. But unfortunalty i am left with no other option as far as i can see... 🙁
January 4, 2012 at 7:44 am
Yes it can. Like i just described. Using a scalar-function inside the select like this:
SELECT
a.col1,
getForeignKey(a.col2, a.col3) as foreignKey,
a.col4,
a.col5
FROM table a
And within the getForeignKey function i can use openrowset to call...
January 4, 2012 at 7:15 am
ChrisM@home (1/4/2012)
If a foreign key in a row of your table is NULL, how can you tell what value it's likely to be?
Well i simplified the first query a bit.
The...
January 4, 2012 at 6:38 am
Thanks for your replies.
A merge is not gonna work for me. What i'm looking for is a way to use a function and insert something somewhere within the function.
And that...
January 4, 2012 at 6:15 am
I just heard from a collegue that this can in fact be done. With the help of openrowset. Dunno the details yet, but i'll post back if i find out.
January 4, 2012 at 4:37 am
Thanks for your reply!
Sorry for not providing the necessary information. I will post back with this soon!
November 24, 2011 at 4:28 am
JonFox (11/8/2011)
November 8, 2011 at 6:39 am
Ok. This was a bit more complex than I first realized.
The job that will update our DM from the DW is not a full update.
It will only select a subset...
November 8, 2011 at 6:23 am
Viewing 15 posts - 16 through 30 (of 35 total)