Tag: syndicated

  • A Double Day

    I’m traveling back from Australia today. A few weeks ago I lost a day when I flew West across the Pacific. Today I get it back, with a different sort of time travel. I’ll leave Melbourne at 9:30am and land in Los Angeles at 6:30am.

    Three hours before I leave.

    Of course, but the time I get to Denver, I’ll be a little tired. Hopefully I get back on schedule quickly as work starts again tomorrow.

  • Simulating Load

    I needed to generate some load for a demo and wasn’t looking forward to doing it. I was in a hurry, and didn’t want to deal with a lot of setup. Fortunately, I’d seen a technique for doing this in one of Brent Ozar’s classes. I’d taken a couple, and they’re good. One of the items I took away was the need to simulate a load that might help me analyze my system.

    Brent’s written about his technique, and I decided to adapt this to my own demo database. I took his code, and then added a few items.

    Examining Parameters

    I was happy with a load of ten items, so that makes things simple. I could reuse most of Brent’s code, but unlike his system, I have different parameters in use for different types of calls. In examining the types of procedures that might generate load, I found I had these types of parameters

    • Integers
    • Dates
    • Strings

    The basic code uses RAND() to generate a number, but what about the other items? I didn’t want scalars, so I needed random other items.

    For dates, I still used a similar random integer, but then used that with DATEADD() to alter an existing date. My code would generate a separate random number and then use that to go backward in time a certain number of days.

    SELECT @off = RAND() * 1000;
    SELECT @dt = DATEADD(DAY, 0 - @off, SYSDATETIME());

    For strings, it was different. In this case, it was search items and while there can be a (seemingly) infinite number of possibilities, I can simulate this. I can select from the table and use a random ordering to get different terms. If this isn’t efficient, that’s fine. I want a load on the system.

    DECLARE @term VARCHAR(100);
    SELECT @term = SearchTerm
    FROM dbo.SearchTerms
    ORDER BY NEWID();
    SELECT @term;

    Once I had these techniques, I built a stored procedure just like Brent’s, and then replaced his procs with my own. I built parameters in front of the CASE statement, and then use the appropriate random parameter for the procs as needed.

    Running the Load

    I used the same SQLQueryStress tool that Brent did, setting the connection credentials, threads, and iterations as needed to generate load. This gives me control over the load I need to generate.

    I had 10 possible procedures, each of which runs with different parameters each time the proc is called. For 100 iterations of 4 threads, I generate 400 calls to my load procedure, which generate 400 random calls to 10 other procs with different parameters

    A quick and dirty load on my server. Not representative of any production load, but good enough to stress the system and let me look for places to tune code. And, a way that I might get some of the weird random things users do.

  • The Data Platform is Important

    I didn’t attend the //build/ conference this year and am slightly disappointed. Only slightly, since I was in these cities in May already and didn’t need another trip: London, Los Angeles, Austin, Brisbane. In addition, my family had to celebrate a birthday, an anniversary, Mother’s Day, and a graduation in May. A busy month for me.

    However, I did watch some of the keynotes and streamed a few sessions. I have more on my list, but one of the big things I noticed is covered in this article: the data platform is becoming more important. Both to Microsoft and their customers as we all start to depend not only on software, but on the data that powers our software systems. More and more executives are waking up to appreciate not only the value of data as an asset, but also that it needs protecting.

    At the conference, there were some announcements that give us more options and more opportunity as SQL Server professionals. We get SQL Server on the Edge, running on ARM platforms, as well as some caching improvements in Azure SQL Data Warehouse. While not a lot of people use ASDW, the technologies that Microsoft builds here are filtering down to the on-premises version of SQL Server. Keep an eye on this caching to come in 2021 or 2022 to all of us.

    There were other items, but one thing that strikes me more and more: this is an exciting time to be working on the Microsoft Data Platform.

  • Keynoting at SQL Saturday #831–Christchurch

    After our SQL in the City Summit in Brisbane last week, Hamish Watson () asked me if I’d do a short version of my keynote talk at the upcoming SQL Saturday in Christchurch this week. I was happy to do so and I’m excited to get the chance to welcome you to the South Island 2019 event.

    If you haven’t registered, and you can come, do so now. Tell your friends, colleagues, family, kids. Bring your kids and let them get some exposure to a SQL Saturday and the exciting Data Platform.

    There’s an exciting schedule, with lots of great sessions. I’m looking forward to a few myself, and if you are interested in Always Encrypted, I’ll give you an overview and demo of this in my session.

    Lots of core database sessions, BI, even a predictive session from Greg Low on technologies to watch.

    Register for SQL Saturday #831 – Christchurch and I’ll see you Saturday.