Viewing 15 posts - 1,726 through 1,740 (of 1,824 total)
Are your statistics up to date ?. Just as a thought I would guess what is happening is that an incorrect query plan is being generated for the...
July 9, 2009 at 1:22 am
Hi , i would suspect that the inline version performs better. Calling a scalar UDF carries a bit of overhead, but SQLProfiler is the tool to use to collect...
July 9, 2009 at 1:05 am
John Rowan (7/8/2009)
It looks to me like they've created a universal 'Descriptions' table that gets linked to every other table in the system. Would this be an accurate statement?
Yup...
July 8, 2009 at 3:40 pm
July 8, 2009 at 3:31 pm
The , perhaps over simple, response is yes , removing scalar functions and joining will improve perfomance.
July 8, 2009 at 3:16 pm
Lynn Pettis (7/8/2009)
Think, I do, that our True Relational Fanatic may have new persona here on SSC.Anyone else have thoughts on this? 😉
I think its the same guy who was...
July 8, 2009 at 3:12 pm
Hi ,
this link[/url] has all you need to know about row concatenation
:edit. Sorry on further reading , this is more of a PIVOT , have a look in Books...
July 8, 2009 at 7:49 am
Ok give this a try...
1,000,000 random strings in 24Seconds
CREATE TABLE dbo.Numbers (Num INT NOT NULL PRIMARY KEY CLUSTERED);
GO
DECLARE @i INT;
SELECT @i = 1;
WHILE @i <= 1000
BEGIN
INSERT...
July 8, 2009 at 5:30 am
try this , ill be interested to hear how it performs in comparison.
Note that the case statement on the call to GetRandomCode is required otherwise you will get the same...
July 8, 2009 at 3:37 am
Ouch.
I would modify the CLR Udf to returns a data set of '@amount' Codes and store those to a temp table.
Then delete duplicates with the codes table and re-execute the...
July 8, 2009 at 1:37 am
Matt is correct about parameter sniffing but i dont think fully answers your question.
As you point out there are 'Two' set statements.
SET @Var = something is very different...
July 7, 2009 at 10:39 pm
Glad you worked it out , if you are using 2005+ there is a smarter way
with cteData(partnum, revisionnum, effectivedate,rownum)
as(
SELECT partrev.partnum, partrev.revisionnum, partrev.effectivedate, row_number() over (partition by partrev.partnum, partrev.revisionnum order by...
July 7, 2009 at 11:21 am
Sorry , no your query is wrong ,
its attempting to convert Partnum to a dateTime due to this
partrev.partnum IN
(SELECT MAX(effectivedate)
From what you have described you query should be more like...
July 7, 2009 at 9:17 am
Im guessing that partrev.effectivedate is a varchar(x) and at least one row contains data that is not a date.
Try
Select * from PartRev where ISDATE(effectivedate) = 0
To isolate the 'corrupt'...
July 7, 2009 at 9:08 am
Elliott (7/7/2009)
I agree it sounds like blocking but I think he meant sp_who not sp_whoo..CEWII
Serves me right for eating Haribo at my desk 😀
July 7, 2009 at 8:14 am
Viewing 15 posts - 1,726 through 1,740 (of 1,824 total)