Viewing 14 posts - 16 through 29 (of 29 total)
Even this simpliest query has the same result. There is the foreign key from TradeActive.IDPosition that references Position.ID.
What can be a reason for this estsimates?
June 15, 2017 at 3:07 am
I even have the index on the IDPosition column which statistics was updated yesterday. I rebuild it but nothing has changed in estimates besides of the index used to scan.
June 14, 2017 at 1:49 pm
Thanks for explaining.
September 2, 2016 at 7:46 am
Here are the plans, sorry for misunderstanding.
September 2, 2016 at 6:21 am
Here are the screenshots. Tell me if you prefer other format.
September 2, 2016 at 3:57 am
GilaMonster, to judge by IO reads and execution plan estimated cost the better is obviously the second. But optimizer chooses the first and this was the question.
September 2, 2016 at 3:25 am
The Dixie Flatline, the concept of "good enough" solution makes sense.
September 2, 2016 at 2:53 am
Sergiy, execution time is not the constant. I run query 5 times with Set Statistics IO,TIME On and here is the result:
SQL Server Execution Times:
CPU time...
September 2, 2016 at 2:49 am
Yes, in this respect it matters and makes sense 'cause the subquery (Select ABS(CheckSUM(NEWID()) / 100000000)) is nondeterministic.
April 14, 2016 at 3:45 am
NewID() doesn't matter in this case
I rewrote it like
Select
Coalesce ((Select Value From Test Where ID = -2), -1)
or even
Select
Case
When
(Select Value From Test Where ID = -2) is...
April 12, 2016 at 3:00 pm
Iwas Bornready (3/8/2016)
Thanks for the script.
You're welcome 🙂
March 9, 2016 at 1:55 am
Try something like this:
Select
tl.team,
Sum (wins.ats) as top5
From
dbo.teamLogs tl
Outer Apply
(
Select
Top 5 tl1.ats
From
dbo.teamLogs tl1
Where
tl1.team = tl.team
Order By
tl1.gamedate DESC
) as wins
Group by
tl.team
February 3, 2016 at 4:39 pm
Viewing 14 posts - 16 through 29 (of 29 total)