2,274 reputation
1725
bio website 127.0.0.1
location Frankfurt Am Main, Germany
age 26
visits member for 2 years, 9 months
seen 9 hours ago

-


16h
comment Quirk update for cumulative sum of chances for a raffle. What can go wrong?
This problem seems to be 99% about calculating the cumulative sum efficiently. There are many methods documented on the web. Maybe you just a little perf optimization work instead of using the quirky update method. 100k rows should not take 15min if optimized. Rather, a few seconds.
1d
comment What happens in this strange SQL Server Mirroring situation?
@RobertLDavis so you are saying the mirror can also send log records to the primary in case it happens to be further along in time? (I have shown in detail how that can happen.) That would pretty much answer the question.
1d
comment What happens in this strange SQL Server Mirroring situation?
I guess the core of the question now is whether the principal or the mirror harden their logs first. If the mirror hardens first (and then power loss to both nodes) the mirror can be further ahead in time. Negotiating the correct LSN is not a problem that I see (just use the max). But diverged writes are a problem and it is not apparent to me how exactly diverged writes are prevented in all cases. Maybe the answer is: The two replica can indeed diverge in rare cases and require manual reinitialization!
Nov
20
awarded  sql-server
Nov
18
comment SQL Server is very slow
This should have been closed right on Stack Overflow. This question will never become diagnosable. The OP needs a tutorial on perf investigation.
Nov
17
answered Select two aggregate functions on the same column using different criteria - performance
Nov
17
comment This instance of (MS) SQL Server has been using a process id of X since dd/mm/yyyy
I'm really not a friend of non-actionable spam log messages. SQL Server can be really chatty with the log.
Nov
17
comment Performance Order By large table with Join
The filter will not be SARGable, that's all. This is generally an anti-pattern. Your case is a valid use case. You can use XML (indeed very CPU heavy) or string "hacks" like stackoverflow.com/questions/337704/parameterize-a-sql-in-clause/…, or some SQL CLR stuff.
Nov
16
answered Performance Order By large table with Join
Nov
15
comment Most cost efficient way to page through a poorly ordered table?
You can create the temporary table in your own database or in a separate SIMPLE-mode, not backed up database. Or, use the size reduction trick I talked about. Also note, that sorting the entire table is going to temporarily use as much tempdb space as it takes to store all the columns you need. Sou maybe you need to derive the row numbers from the already existing (unique) index (and apply the size reduction trick).
Nov
15
answered Most cost efficient way to page through a poorly ordered table?
Nov
10
comment A transaction log grows unexpectedly
Seems like both logs are full, maybe because they are on the same disk. Investigate both causes that the message gives you.
Nov
10
comment RAM usage is increasing in database server with time
Why is RAM usage even a problem?
Nov
5
awarded  Custodian
Nov
5
reviewed Approve suggested edit on What is the RecoveryUnitID in DBCC LOGINFO
Nov
4
comment Signal wait always high
None of the wait types are a problem intrinsically. You don't need to "fix" them if you are happy with the current performance. All that SOS_SCHEDULER_YIELD means is that tasks exceed their 4ms CPU quantum from time to time. If your queries run for >4ms that's to be expected. There is no fix except for tuning queries.
Nov
3
comment SQL Server 2012 DBCC memorystatus has wrong information. How can I correct it?
When Windows says "virtual memory is low" it means "The commit charge is nearing 100%. At this point I will fail allocations.". This "virtual memory" is not the same that the v-memory counters talk about. Determine what is consuming memory by querying the DMV. Why didn't you do that yet?
Nov
3
comment SQL Server 2012 DBCC memorystatus has wrong information. How can I correct it?
What is your goal actually? I understand you want to find out why SQL Server consumes that much memory and how to stop that? Or do you really care about the counter values of MemoryStatus (as you have asked)?
Nov
3
comment SQL Server 2012 DBCC memorystatus has wrong information. How can I correct it?
Again, virtual size is irrelevant. Virtual size is not memory "in use". I can reserve 1PB of virtual memory in a single API call to Windows on any box. Order by the pages_used_kb column. That's actually "in use" memory.; Procexp has not a single counter that you can use to see memory used by SQL Server's buffer pool. I tested this. It just does not appear anywhere.
Nov
3
comment SQL Server 2012 DBCC memorystatus has wrong information. How can I correct it?
Starting with SQL Server 2012 you cannot find its memory usage in task manager. The buffer pool seems to not be represented at all. If your sqlservr.exe has that much private bytes something other than the buffer pool is consuming memory. Query the DMV *memory_clerks. Whatever it is called. Virtual size is irrelevant btw.