Category: Blog

  • The Conference of the Year–T-SQL Tuesday #153

    tsqltuesdayIt’s the second Tuesday of the month and it’s time for T-SQL Tuesday. This one is hosted at my request by a good friend, Kevin Kline. Kevin has been a large part of the #sqlfamily as a speaker, teacher, educator, friend, and driving force for PASS and the annual Summit conference.

    This invitation is asking about a conference or event that changed your life, that created an opportunity, or just changed your life. Career, other otherwise. It’s a great topic, and it’s one reason that I am running SQL Saturday. Events and interactions with others can change your life. It did for me, and for many others.

    1999

    This year always stands out as a reminder of Prince (RIP). However, it was also the first year I lived in Denver. I moved out with my wife and two kids to work at a financial services firm. That summer I saw an advertisement for a new professional group, the Professional Association for SQL Server. They were having a conference that October in Chicago. I asked my boss to go, they agreed, and I made arrangements.

    Two things stand out to me. First, my wife, sister-in-law, and toddler son came. We went to the last baseball game of the year at Comisky Park. My wife and SIL  also smoked cigars with me in the hotel bar. A memorable fun trip for me.

    The second thing that stands out is that I met Kalen Delaney there. I’d read her Inside SQL Server book and watched her talk. Afterwards I went up to the stage and asked a question and shook her hand. An exciting moment for a young data professional at the time, and one that spurred greater interest in learning more about SQL Server and becoming a better DBA. I’ve also been honored to know Kalen and meet her at many events around the world since.

    That event kick started me from being just a DBA to being someone that wanted to be involved with the community, that believed I could speak in front of people and teach them things, and I could help my career by attending other events.

    Conferences and Career

    Most years I attend 10-20 conferences and speak at them. I may attend a few others and not speak, and I usually have a few internal or Redgate run events. I’ve very lucky, and I enjoy getting to visit interesting places in the world as a part of my job.

    While I pick up technical bits and might get an idea for how to solve a problem in code, the most valuable parts of conferences are talking with other people and networking. Yes, networking, which is really just shaking a hand and answering a question. Or shaking a hand and asking a question. Or even commiserating with someone next to me about how some technology doesn’t work. Sometimes those last conversations are the most memorable and enjoyable.

    This networking is incredible and I’m amazed how I hear about different opportunities. Even before I ran SQL Server Central, talking to people at events drove my career forward.

    Whether you go to a user group meeting, a local SQL Saturday, or a larger paid conference like the PASS Data Community Summit or SQL Bits, if you make an effort to chat with people, interact, and take notes, I think you’ll find it as invaluable to your technology career as I have.

    Getting Involved

    The last thing I’d note is that I run SQL Saturday as an independent, US charitable 501.c.3 corporation, independent of Redgate. I’ve found user groups to be great, but hard to manage every month. When Brian, Andy, and I set up SQL Saturday, we did so to bring local conferences to people whose employers might not pay to send them to Ignite, the PASS Summit, or other expensive conferences.

    I would love to see more SQL Saturdays in more places in the US. It’s not that hard to run one, and you don’t even have to speak in front of a crowd. If you’re interested, ping me at admin@sqlsaturday.com.

  • Working with Neo4j Imports–I HATE CASE SENSITIVITY

    I’ve been working to better understand graph databases and where they can be useful.

    There is a file from Neo4J that comes with the Desktop and contains a data export from Northwind. This looks like this when you open it:

    2022-08-02 16_24_48-employees.csv - Excel

    On the page where Neo4j talks about the employee imports, they have this code:

    // Create employees
    LOAD CSV WITH HEADERS FROM 'https://gist.githubusercontent.com/jexp/054bc6baf36604061bf407aa8cd08608/raw/8bdd36dfc88381995e6823ff3f419b5a0cb8ac4f/employees.csv' AS row
    MERGE (e:Employee {employeeID:row.EmployeeID})
       ON CREATE SET e.firstName = row.FirstName, e.lastName = row.LastName, e.title = row.Title;

    This loads fine.

    When I run this code, it works. When change to this, it fails. It’s erroring out on my file. I tried moving the file, removing nulls, etc.

    LOAD CSV WITH HEADERS FROM 'file:///employees.csv' AS row

    MERGE (e:Employee {employeeID:row.EmployeeID})

    ON CREATE SET e.firstName = row.FirstName, e.lastName = row.LastName, e.title = row.Title;

    Here’s the error in the Neo4j Browser:

    2022-08-02 16_35_03-neo4j@bolt___localhost_7687_neo4j - Neo4j Browser

    I kept editing the file and trying different things. I compared what I had locally with what was on GitHub. Eventually, I realized this is the issue:

    {employeeID:row.EmployeeID}

    In the GitHub csv, the first row has headers with EmployeeID. In my local file, the header is “employeeID” (lower case). As soon as I edited this, it worked.

    THIS IS THE FILE THAT CAME WITH NEO4J DESKTOP.

    They make mistakes, just like I do. I hate that there are too many things like that that are care sensitive. I get that sometimes you want data to be in a particular format, but I think in the modern world, making metadata case sensitive isn’t productive.

  • Daily Coping 8 Aug 2022

    I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag.

    Today’s tip is to set an intention to be kind to others and yourself this week.

    This week I’m traveling to Redmond and Los Angeles. I will encounter service people in restaurants, drivers for taxis, airport workers, and many attendees at events. My wife is also going to LA with me to enjoy a weekend together after SQL Saturday Los Angeles 2022.

    I am making a conscious effort today to be kind to others, let small things go, be empathetic and understanding. I’m also going to remember that this will be extra time and stress out of my week and I need to ensure I eat well, find some time to exercise, and relax when I can.

  • Driving Costs With a Tesla Compared to Gas

    This is part of a series that covers my experience with a Tesla Model Y.

    I wrote recently about the costs for me to charge at a Supercharger. The USD$0.43 was higher than I expected, but lower than the USD$0.58 I’ve seen some CA people post about.

    With the intricate linkages of the World Wide Web, I’ve seen a few articles lately about charging. First, there was a debunking of a meme at Jalopnik, which I thought was crazy. Especially since I own a horse trailer. Then there was a user posting at Reddit that ended up poorly shared on Autoevolution. For the record, I find that site have poor journalism standards.

    I also caught a post on Facebook about new public electric chargers coming to Colorado and was amused by all the comments about the grid failing and not being able to handle things and how expensive and poor for the environment electric cars are.

    A lot of hype and silliness, or FUD, from lots of non electric positive people. However, I wanted to check on the real costs for me. So I got some of my data.

    Comparing Costs

    I still have a 2012 BMW X5. I was thinking to replace it with something similar when we got the Tesla. So purchase costs are out for me, but I did decide to compare the cost of operating that car with the Tesla. I also decided to add a Prius in. Now, our old Prius would get around 47-48 in the summer, 43-44 in the winter. This car was rated at 50mpg. A newer one, like the Prime, is rated at 54, so I’ll use these values for my MPG:

    • BMW – 22
    • Prius 50

    I also compared the cost of home charging v Supercharging. My experience recently is these costs:

    • Home – $0.14
    • Supercharging $0.43

    I have solar, but since I just use power, if I spend it charging the car, I pull more from the grid, so I’ll leave that cost the same.

    Trips

    I run Teslamate, which logs all my drives. I can see the distances and power usage for each trip. As you see below, there is a lot of data.

    2022-07-27 10_25_50-Drives - Grafana — Mozilla Firefox

    I grabbed a sampling of trips, long and short, around town and into the mountains. The gas cars do worse in the mountains, as does the Tesla, but rather than try to make things complex, I left the same MPG for the gas cars.

    Methodology

    • For a particular trip, I get the mileage and kWh used. I can multiple kWh by cost and get a simple cost for electricity in two ways: home and Supercharging. This isn’t my actual cost, but hypothetical if all my charging were in one of these two places. As an example, for a 20.2mi trip, I get:
    • home cost –  $0.56
    • Supercharger cost – $1.72

    For the gas cars, I divide the miles by mpg. This gives me gallons used. For that 20mi trip is just under a gallon for the BMW and under half a gallon for the Prius. I then multply by the gas cost. I set that at $4.30 for now. It’s been higher lately, but I paid that last week on a trip to the airport (I took the BMW).

    I put a set of 11 random trips in a spreadsheet and compared things. This is what I see:

    2022-07-27 10_30_21-Book1 - Excel

    For my 2o mile trip, I see these costs:

    • Home: $0.56
    • Supercharging: $1.72
    • BMW: $3.95
    • Prius: $1.74

    For a longer trip in the mountains, 55mi, I see:

      • Home: $2.03
      • Supercharging: $6.24
      • BMW: $10.81
      • Prius: $4.76

    The aggregates for 418.8 miles (this sample) are:

    • Home: $15.76
    • Supercharging: $48.42
    • BMW: $81.86
    • Prius: $36.02

    Clearly the Tesla is a lot cheaper if I charge at home. My power costs are mostly fixed, though the Supercharger can be cheaper than $0.43. It could be more expensive, but I haven’t seen that. Gas certainly goes up and down and even at $4, home charging is cheapest.

    The Prius looks good in a bunch of places compared to Supercharging. I had 4 of those 55mi trips in the mountains, all on Supercharger charging, but I also know the Prius would not be getting 50mpg there. Probably more in the 25-ish range. Mountains are steep.

    My Experiences

    I’ve owned lots of cars. My experiences in the last year, in looking at data and comparing to the Prius, BMW, RAM 3500, and other cars, is that the Tesla is a lot less expensive to operate. My back of the napkin thoughts before this were the Tesla is about 1/2 of the Prius cost and 20-25% of the BMW to operate.

    You can make all sorts of comparisons on ROI and costs, and you should. For your situation. For me, given my life and choices, this was a great purchase. I’d have spent $45-50k anyway on a car, so the purchase wasn’t something I calculated in. I also carry 5 adults at times and that wasn’t very comfortable in the Prius. The BMW worked fine, as does the Tesla.

    Charging isn’t simple, and while I got a wall charger + installation for US$760, I would not be surprised if a lot of people paid closer to $1500. However, it’s not a crazy cost, and it’s essentially adding another circuit for your clothes dryer. A good portion of us can do this, and then we have a “full tank of fuel” every morning. That alone is a very neat experience.

    I think Tesla is great. If we needed another car, we’d look at Polestar, Hyundai, Rivian, and a few others. I’m sold on them as an every day car that is relatively cheap to operate. We’ll always have the diesel pickup for towing and trips if we need it, but having owned different types of cars, the electric paradigm makes a lot of sense.

    And if we really wanted a car for a trip and worried about charging, like through Montana, we’d just rent a car. We’ve done that in the past to save wear and tear, and it’s hard enough to find fuel in Montana and Wyoming at times. A rental would be an easy choice, so range anxiety isn’t a problem. If I have it, I get rid of it for that trip. Not for the rest of my life.