While Italy continues to be brutally hit by this unrelenting disease, they have stepped up their efforts in testing in a the northern city of Vò . They are taking on the task of testing everyone in a desperate effort to stop the virus and what they are finding is bad news and a possible resolution that escapes our current expectation. The article states: By some reports, between a half and three-quarters of carriers in Vò, were asymptomatic. https://www.newsweek.com/coronavirus-mass-testing-experiment-italian-town-covid-19-outbreak-1493183 So what does this mean? While I am by no means an Epidemiologist, it most likely means the virus is way more contagious that we think it is, and that many more people “have it” that previously believed, however these people exhibit no symptoms whatsoever, marking them as “asymptomatic carriers”. How long the virus stays in an asymptomatic carrier is anyone’s guess, but I would venture to say no more than the 21 days as reported being the largest outlier. We can correlate these asymptomatic findings with another article written by Israeli nobel laureate Michael Levitt. The most convincing he cites is that of the Diamond princess. He equates the diamond princess where he states: The Diamond Princess cruise ship represented the worst-case scenario in terms of disease spread, as the close confines of the ship offered optimal conditions for the virus to be passed among those aboard. The population density aboard the ship was the equivalent of trying to cram the whole Israeli population into an area 30 kilometers square. In addition, the ship had a central air conditioning […]
Continue reading ...
In a deviation from what this site usually reports on, “SQL Server” I’ve decided to create a post about Coronavirus. Doing a bunch of research to figure out the first symptoms people exhibit, I’ve recorded some of the research here. Sources are included below as well. I’ll continue to update the list as I find more. Coronavirus First Symptoms: >>What did your first signs feel like? Did you cough first and get fever later? “First signs were being supppper achy and having a fever, cough came probably a couple days in but the chest pain/hard time breathing was there from the jump” >> What was your temperature in the beginning? 102-103 the first time I got it checked [deleted by user] by inAMA SECOND PERSON: >> I keep getting messages about symptoms, so here’s a day by day. Friday 6 day 1 : contact with the person for 45 mins in a small non ventilated room, along with my husband and son. Mon 9 D4 : chills, low fever for me and toddler, feeling strange and an itchy throat some cough Tues 10 D5 : diarrhea, strong throat ache and headaches. Low fever, Dry cough. This is a day we got the email Saying we were in contact Wed 11 D6: dry cough, headaches, weight in my chest- like pressure. I’m pretty exhausted. No fever but I thought I was a lot better. Thurs 12 D7 : bouts of dry cough, just like being so tired I can’t catch my […]
The news is out. The consensus on using hints is “Do not use them”. They will ruin you. But much like the 1950’s people keep their dirty laundry to themselves and outwardly show their best “non hint” selves, this applies as well. With that said, I will go ahead and use the disclaimer that you SHOULD NOT use hints. But, if you ARE like me, and touch a lot of SQL code where there is a huge difference in site performance between a 1 second execution and 20ms execution, then sometimes you don’t have much of an option. With that said, I will talk about the optimizer. It’s getting smarter and smarter at dealing with the majority of queries and keeping them within an even keel baseline. But that comes at a cost. It can’t take as many chances so it plays it safe. And this is where you come in. But before you go around adding hints everywhere in your system (which is a horrible idea). You need to know how to write code so that it will not NEED hints. To do this is very simple. The answer is KEEP IT SIMPLE. In other words, keep the queries simple. Do not create huge SQL Statements. It’s much better to break the queries up so that you do not give the optimizer many different routes to take. Breaking them up typically entails materializing the data into temp tables (write as little data as possible) so you can break up […]
Continue reading ...
We’ve all had it happen, alerts start going off that the CPU on the SQL Server is now pegged. It’s an all hands on deck situation that you need to figure out quick. It helps to know the history of your SQL Server performance, but if you don’t there’s still hope using some troubleshooting techniques. First Make sure it’s SQL Server Sometimes there can be other processes (even backups) that are causing the CPU to push over that final edge. If you don’t have access to log into the box, the quickest way to determine how much CPU SQL Server is using is to run the following DMV: [cc lang=”sql”] DECLARE @ts_now bigint SELECT @ts_now = cpu_ticks / (cpu_ticks/ms_ticks) FROM sys.dm_os_sys_info; SELECT record_id, dateadd(ms, -1 * (@ts_now – [timestamp]), GetDate()) as EventTime, SQLProcessUtilization, SystemIdle, 100 – SystemIdle – SQLProcessUtilization as OtherProcessUtilization FROM ( SELECT record.value(‘(./Record/@id)[1]’, ‘int’) as record_id, record.value(‘(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdle)[1]’, ‘int’) as SystemIdle, record.value(‘(./Record/SchedulerMonitorEvent/SystemHealth/ProcessUtilization)[1]’, ‘int’) as SQLProcessUtilization, TIMESTAMP FROM ( SELECT timestamp, CONVERT(xml, record) as record FROM sys.dm_os_ring_buffers WHERE ring_buffer_type = N’RING_BUFFER_SCHEDULER_MONITOR’ AND record LIKE ‘%%’) as x ) as y ORDER BY record_id DESC; [/cc] If the OtherProcessUtilization column has a high value then you know you need to log into the box, open task manager and figure out what is hosing your system. It should be noted that you really should only run SQL Server on SQL Boxes, and if this is your issue, you’ll learn that today. If it is SQL Server, then it typically falls into one […]
There are two different functions that can be used when converting an integer to a string. One is CAST and the other is CONVERT. Either of these functions can be used with the exact same result when converting to a string. The only difference with the CONVERT function is that it takes an extra optional parameter for style which can affect the way certain data types are displayed after they are converted (an example is with date/time formats). The common need to convert an INT to a string is to then concatenate it with either another int or an existing string. Here is a simple example: [cc lang=”sql”] SELECT CAST(12345 AS VARCHAR(11)) [/cc] And the output: Here we are casting the int to a varchar(11). This is a safe value for us to convert to because the maximum integer value is -2147483648. We see if we try to convert an integer to a smaller string, it returns back an asterisks (*) meaning an error has occurred. [cc lang=”sql”] SELECT CAST(-2147483648 AS VARCHAR(10)) [/cc] So it is important to choose a data type that is large enough. With that said, I have seen the following work as well, however I personally would not run this in production in case it is deprecated in a future version of SQL. [cc lang=”sql”] SELECT CAST(-2147483648 AS VARCHAR) [/cc]
Continue reading ...