Viewing 15 posts - 31 through 45 (of 72 total)
This increases performance!?
Feels counterintuitive, to see ram hovering at 100% 24/7 on production server and think that it increases performace.
I'd like to have atleast 10% spare for other OS...
March 7, 2012 at 5:25 am
Ty!
Both solutions worked great. Also nice to see different approaches to same problem.
March 6, 2012 at 7:23 am
Nice! It seems indeed to be slighty faster, the executaion plan shows query cost of my old query being 58% and CTE query 42%...
And statistics info old query vs...
February 16, 2012 at 8:20 am
Oh sorry there was some scope creep... users have a registered field, that needs to be included in every where clause, so the current CTE solution wont work.
SET STATISTICS IO...
February 16, 2012 at 7:39 am
@Recurs1on & @sean Lange
That helped ty very much 🙂
February 13, 2012 at 7:53 am
Hmm not really.
I got this query..
Select a.a from a LEFT JOIN b ON a.a=b.b WHERE b.b IS NULL
Is it possible to get same results with
Select a.a from a LEFT JOIN...
February 13, 2012 at 7:45 am
Cadavre (2/7/2012)
Loads of ways to do this.
Ah ty!
Lets see if i can apply it... have alot of inner join in the real query...
Conclusion: It worked with my query.. ty!
After some...
February 7, 2012 at 3:39 am
If there's no way for dynamical months, then 30 days/month.
January 19, 2012 at 6:31 am
declare @date1 date = '2010-05-17'
declare @date2 date = '2013-01-16'
declare @years int
declare @months int
declare @days int
select @years = DATEDIFF(YEAR,@date1,@date2) - case when datepart(day,@date1) > datepart(day,@date2) then 1 else 0 end
select @months...
January 17, 2012 at 8:54 pm
select [Years] = datediff(year,0,ET-ST)-1,
[Months] = datepart(month,ET-ST)-1,
...
January 17, 2012 at 8:48 pm
Running on production server, but yes, alot less reads.
The changes you did made a huge impact on reads in your query.
December 12, 2011 at 6:59 am
Cadavre (12/12/2011)
Try these changes and test again (it's a little difficult without an actual execution plan)
========== Jim-720070 version ==========
Warning: Null value is eliminated by an aggregate or other SET operation.
(3336...
December 12, 2011 at 6:46 am
Here's the result with real data:
========== Jim-720070 version ==========
Warning: Null value is eliminated by an aggregate or other SET operation.
(3336 row(s) affected)
Table 'Worktable'. Scan count 0, logical reads 0, physical...
December 12, 2011 at 6:11 am
Oh one more thing!
I compared both queries to view the performance, and realized that Cadavres query return 1/4 more results then Jims...
Checking the results it showed that Cadavres does...
December 12, 2011 at 5:45 am
Viewing 15 posts - 31 through 45 (of 72 total)