Viewing 15 posts - 136 through 150 (of 1,193 total)
As Thom said, if you could give us sample data that recreates the issue that would be ideal.
Also, what is the exact query you ran?
Cheers!
August 1, 2017 at 8:16 am
https://www.sqlservercentral.com/Forums/1889627/Ranking-for-each-group is the duplicate. I'd post any replies there instead of here.
Cheers!
July 31, 2017 at 5:15 pm
Here's one way (I have a nagging feeling this can be simplified, but it's getting a bit late in the day so I'm not sure how much more thought I'll...
July 31, 2017 at 5:11 pm
Something like this should do the trick to create the missing #inv rows, if I understand your request correctly:
SELECT i.inv_id,p.name,p.prod
FROM #prod p INNER JOIN #inv...
July 31, 2017 at 4:16 pm
I'll have to actually run through your example to give exact numbers for this exact data, but I can make a quick general point.
With a plan that uses...
July 27, 2017 at 12:34 pm
The statistics for a user object are physically stored in the relevant user database's files. See https://dba.stackexchange.com/questions/27151/where-are-statistics-physically-stored-in-sql-server, for example.
Cheers!
July 27, 2017 at 8:43 am
I suspect you haven't had any answers because SQL 2016 is still relatively new...
July 26, 2017 at 11:16 am
Ah, nice catch, Jason.
Yeah, there are a couple different functions in that query (in addition to the one you pointed out, there's a reference to dbo.ufn_IsWithSLA). Since the...
July 25, 2017 at 2:35 pm
That's not surprising.
The sort is for the results of the merge join between tbSPT and tbTechnical_Details, which is on spt_ref_no=[Opportunity Reference]. That output will be ordered by the...
July 25, 2017 at 12:33 pm
Again, all of these attempted changes are blind guesses until you know why the query takes the time it does.
You need to collect information about that session when...
July 25, 2017 at 8:41 am
..the query which takes about 2 seconds to run normally clocks until the timeout is reached.
Ok, this is what I was looking for.
A few questions.
July 24, 2017 at 3:29 pm
Still no real detail. 🙂 Unfortunately, to us "quits working correctly" is no better than just saying there's "odd behavior".
What exactly do you mean?Is the problem...
July 24, 2017 at 2:30 pm
This sort of thing occurs because the memory granted was not enough, typically because the estimated rows are drastically inaccurate.
This exactly happens in your query plan. The sort...
July 24, 2017 at 8:48 am
One quick note: you're using TOP 1 without an ORDER BY, so if you have multiple values for rn that meet your criteria, there's no guarantee you'll get the same...
July 23, 2017 at 11:13 am
PAGEIOLATCH_* waits occur when a page has to be fetched from disk into the buffer pool.
PAGELATCH_* waits occur for data file pages in memory, as Perry said.
July 21, 2017 at 11:55 am
Viewing 15 posts - 136 through 150 (of 1,193 total)