Viewing 15 posts - 14,236 through 14,250 (of 18,923 total)
Quadruple post, finish the thread here :
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=211788
August 18, 2005 at 1:23 pm
Quadruple post, finish the thread here :
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=211788
August 18, 2005 at 1:22 pm
Ok, do not use cursors
.
Has someone added and index, column whatever to that table while the cursor was running?
August 18, 2005 at 1:22 pm
Damn I'm gonna be god one day... I pretty much have a gun waiting right beside the server for anyone who wants to come close
August 18, 2005 at 1:18 pm
You can always use the numbers table instead and recreate the dates on the fly just like I did to populate the table.
If your DBA doesn't want a numbers table...
August 18, 2005 at 1:13 pm
It's called parameter sniffing. There's a few articles on that subject on this site. Basically when a sp is first used, a plan is created and saved, but...
August 18, 2005 at 1:09 pm
try that with the new sp :
declare one variable by parameter and transfer the parameters values into those variables, then use those variables in the select. then compare...
August 18, 2005 at 12:47 pm
well you still have you try what I proposed for the where condition and the join (with indexed calculated column). That's speed up the thing a lot.
Try that...
August 18, 2005 at 12:38 pm
Hey bulldozer... been a while
.
I think my solution is slightly faster that Farrell's
.
August 18, 2005 at 12:36 pm
olap systems are not the same... they have report tables that are refreshed every x minutes... so you don't wait for the query to run.
Can you put the function code...
August 18, 2005 at 12:13 pm
You have to find a way to make sure they use the datarange. a scan of 1 M rows just can't be fast.
August 18, 2005 at 12:01 pm
Glad to hear that. Maybe you should drop a line to the other DBAs, maybe that'll ring a bell for something they did in the last x months.
August 18, 2005 at 11:58 am
Create a calendar table (all dates of the year for any range of years needed then :
Select Date from dbo.Calendar where Date bewteen @StartRange and @EndRange and datepart(dw, Date)<...
August 18, 2005 at 11:56 am
So how exactly are you using this function in the main select (join to it, or use in a subquery)?
August 18, 2005 at 11:37 am
Viewing 15 posts - 14,236 through 14,250 (of 18,923 total)