Life Hacks to Save Our Sanity

This image has an empty alt attribute; its file name is T-SQL-Tuesday-Logo-e1518373137845.jpg

Jess Pomfret (b|t) asked us in this month’s t-SQL Tuesday topic to talk about a life hack we’ve done that’s made things easier for us. This is perfect timing for me; I wanted to share a couple of stored procedures I wrote for the book (Refactoring Legacy T-SQL For Improved Performance). The CodeCascade procs can be found on a GitHub Repo called CodeCascade.

Actually, the idea for this code started back when I listened to Andy Yun (b|t) give a talk about nested views. I was dealing with a 2,000 line stored procedure that would be interesting to rewrite, but it really shouldn’t take me that long, right? I mean, 2,000 lines. Except that it called a function that was also 2,000 lines, which called a few procs, not to mention a few other things the original proc called, and then … well, yeah, you get the point. 20,000 lines of code later, I was like, WHAT did I get myself into?

So, since we all know how excellent we are *cough* at estimating time to perform tasks, I figured it would have been a good thing to have known about this cascading miasma of code before I dove in head-first. Andy’s presentation had code to show the cascade of a view – all of the views it called, and views they might call. I wanted to adapt this to work for stored procedures and functions as well. (Forewarned is forearmed, after all.)

So, I blithely knocked together some code to tell me exactly what objects (procs, views and functions) that my code called, using SQL Server’s dependency information. I went to run it on that exceptionally offensive proc. And guess what? It blew out after 200 recursions. So, I set the limit to 400 recursions, and… it blew that out as well. OH NOES! Well, I had also set a kind of breadcrumb trail field in this because I was particular about the sorting (I wanted each cascaded item to be under the parent that was calling it.) So, I had each object line check to see if that ID was already in the breadcrumb field, and if it was, add a message that it was part of a loop, and stop trying to recurse through that particular line.

Once that was polished up, I also did the “reverse” – what code CALLS my code, and what code calls THAT code? This is again based on dependencies, and checks for that eternal loop.

These procs have come in handy many times. I encourage you to use them and modify them if you’d like, but it’d be great if you left the intro flowerbox on that attributes the original code to me. If you do make changes that you think others would find helpful, please feel free to let me know and I’d be happy to add your changes and attribute them to you as well!

I hope these can help you as well 🙂

Dealing with Impostor Syndrome

Jon Shaulis (b|t) asked us in this month’s t-SQL Tuesday topic about impostor syndrome. Do we have it? How have we worked past (or around) it? The first question is easy – I don’t know anyone who hasn’t dealt with impostor syndrome, unless that someone is new enough to whatever job or task they’re doing that they don’t have enough experience to know there’s no way you can ever know everything.

The second question can be more difficult. Also, if you lose self-confidence in one area of your life, it can destroy your self-confidence in all areas of your life without you even realizing it. Being self-aware, which is something we should all strive for, unfortunately makes you more prone to this in my opinion.

So, we all think of ourselves as “normal” because we grew up with us, and we know how we feel, and how our family or peers were or are, and what we look like in the mirror, and how much we curse when we accidentally jam our foot into the doorframe – all of those things are familiar and “normal”. We know what we do know and all of those things that we don’t know. When we see someone who knows more or is better at something than we are, it’s very easy to fall into the trap of thinking that person knows so much more “stuff” than we do.

But there’s something that it’s easy to forget. You know something that no one else in any given room does. You are better at something than each and every person. And the opposite is also true: each and every person in the room can do something better than you, or knows something you do not. Everyone has unique experiences and our brains all do “thought algebra” differently. Wait, whut?

So I can look at a and b, and to me, a + b obviously equals c. To someone else, a + b = m. Neither of us are necessarily wrong, everyone just collates information differently, and not everyone solves things in the same way. Nothing has more than just a single solution (well, except the meaning of life, but since no one has figured that out yet…)

So what does this have to do with impostor syndrome? Everything, actually. It’s very hard to do, and I am just as bad as everyone else with this, but we all need to realize how special and amazing each and every one of us are. (It’s still hard to not say “each and every one of you”, and to include me in the amazing people. See?) Maybe there are skills we still need to learn, and we probably will learn those skills. But as people, we are all unique individuals with the capacity to do amazing things. We also need to surround ourselves with friends who remind of this regularly. Discussing this with people we trust, who we know care about us and not about what they can get from us, will go a very long way to help us stay in the right frame of mind when dealing with impostor syndrome!

Thanks for listening 🙂

PASS Summit 2019 Networking Dinner

It’s that time again – time to start thinking about the networking we’ll be doing while we’re at the PASS Summit! I have a list of networking items I’d like to check off, including… well, ask me about it when you see me at Summit!

I’ll be organizing the Networking Dinner again this year. We’ll be meeting at the Tap House Grill, and I don’t think I’m going to split it into different times. Just please show up any time between about 5:30p and 8p! This will give folks attending precons time to go and get rid of your laptop bags (but please stick several business cards in your pocket!)

https://www.eventbrite.com/e/pass-summit-2019-networking-dinner-tickets-74574974757

Here is the Eventbrite link, please go ahead and get a free ticket so we can get an idea of how many of us will be descending on the Tap House. (I feel like we should at least try to let them know about it!)

This really is a wonderful event and folks make long-term network relationships and friendships at this dinner. Please join us, get to know more of us, and start early to make the most of your PASS Summit experience. I’m looking forward to meeting you!

Also, I’d like to find someone who would be interested in taking over the organization of this event. If you think you would be interested, please talk to me at Summit this year. There’s not much to it – talking to a few restaurants, posting a blog and sending out to the Twitters.

See you soon!

What I Use(d) Databases For

Isn’t it the joke that the cobbler’s son goes barefoot, or that the doctor’s kids are always sick?  So, does this mean that database people should.. use databases?  Well, of course!  This month’s T-SQL Tuesday is about what we use databases for more in our personal lives. Thanks to Todd for the interesting topic 🙂

I started using them personally for a couple of reasons – for practice, and because, well, I needed to track data.  So, what do we need to track data for? Well, in my case, it was (dum dum dum) …. my first wedding. Who were invited? What were their addresses? Were they invited to the shower? What gifts did they give? (Inevitably my mom needed to know so she knew what level of gift to give their kids when the time came. You know how that goes.)

I also went ahead and printed out my own invitations. Do you KNOW how expensive those things are?  Well, if you’ve ever gotten married, then I suppose you might. You can get embossed, very pretty card stock for a WHOLE lot less than the invitations.  And then, voila – print them out from the database. Okay, I have to make a confession – it was in Access. (I know, go ahead, get it all out. Yuk yuk yuk…)

So, since I started tracking presents, I kept doing that -and woot, printed thank you cards!  And you know, while I had everyone’s address in there, uh… CHRISTMAS CARDS! Because you have to make sure you send Christmas Cards to everyone who sent them last year, but if they haven’t sent them to you in two years, you don’t have to send one. But then they send one at the last minute and you have to send one back at the laster minute, and…  and then I just gave up sending Christmas cards anyway because I always wrote long cards with info and no one ever wrote a *#&$ thing back and just signed them.

I have started living on Kanban boards. I’m trying Trello for personal stuff to see if I can get my life a little bit more in order and under control. This may be impossible, but I need to at least try. Even though that’s not directly me designing and coding the database, it’s… similar.  Other than that, though, I keep my life pretty simple. So, no databases for me outside of work anymore. And you know, that’s okay 🙂

 

Dipping into the Cookie Jar

Chocolate chip – I mean, who are we kidding? My Grammie’s homemade.. I don’t care that she followed the same recipe on the back of the chocolate chip bag as everyone else does, they were amazing. And no one can make them the same….

But that’s not really why we’re here. It’s T-SQL Tuesday and Shane O’Neill has asked that we talk about what excellent things we’ve done that keep us going. Now, most (most…) of us tend to be humble, but I know there’s those wins that keep us bouncing with happiness and excitement when we’re not cursing the dumb….. (sorry, too much of the dumb last week.)  Positive!  Positive!

It’s funny because Shane (t|b) is actually involved in one of my cookie jar experiences. It was, what, Summit 2017?  I was sick. Like, uber Nerd Flu, couldn’t sit through an entire session without disruptively coughing, miserable, only-one-party-a-night, sick. (I know, right?)  Friday night, Lou Gonzalez and I dragged me to the Tap House, because.. well, the Tap House. And there were a few #SQLfamily hanging out. There was a couple of English guys – one attendee and his dad  – playing pool. They were amazing to watch, so I was huddled in my misery watching them.

A man named Matteo came over and asked me if I wanted to play. I figured I could at least try, and we were joined by Shane and a great guy named Kevin (t|b). And in my miserableness, I proceeded to play the best pool I think I’ve ever played.   How is this memorable? Mostly because I got to meet some really cool new friends.  And, sometimes even in low points, something great comes out of it.

Okay, okay, there’s more to my cookie jar. My brother owns a small tech support company, and I wrote a SQL Server backend/Coldfusion web front end (enough with the laughing, peeps…) application to handle his techs, their customers and the work. He ran his business on it until last year. 16 years, people. With extremely low maintenance and not much need for enhancements. His entire, successful business.

In my last job, there was functionality that needed to run 6 times in about a 15-minute time span. Problem was, each run took about 2 and a half hours. That kinda math just doesn’t add up. I took that crazy thing down to about 30 seconds per run. Now, granted, the code has to be a little messed up for you to make that kind of improvement, and that’s a facepalm of an entirely different sort.  I have had a couple of these also in my current job, and it never gets old.

Also, in my current job, I’m finally becoming included. The DBAs were the rogue people who always said no and almost everyone went out of their way to avoid us. Upon our move to Scaled Agile, I fought to get one of my team on each of the scrum teams, so we could catch issues before they happened, and become partners in coding/education with our developers.

I’m being asked to be involved in higher level planning – architecture decisions, process improvements, and also in some other ways. I’ve also become much better at listening. Because of this, I can help in some less obvious ways, with more personally-related issues. Bringing that kind of value to my company, my boss and my co-workers – many of which have become good friends – has some super-good feelz associated with it.

And, I cannot end this without mentioning my first horse. He had a rough babyhood – someone shot him as a youngster (in their favor, he really did look an awful lot like a deer, but…)  They couldn’t remove the bullet from his neck because it was too close to arteries. He didn’t have much interaction with people – when he did, his would had become infected and maggot-infested (sorry for the gross) and his skin had grown around his halter. So they had to hold him down to cut the halter out of his head and clean the wound.

He had a lot of trust issues, and was a powerful boy. I spent a lot of time learning how to bail off of him (not always by my own choice.)  But, he was incredibly athletic, and needed someone to love and believe in him. He was my boy, and got me through a whole lot of rough patches in my life. I also really believe that I saved him too, though – he would have gone from owner to worse owner to the slaughterhouse eventually because he would have been considered “dangerous.”  It took 12 years of work and love and trust before he really calmed down, but I was absolutely his person as much as he was my horse.   Earning his trust and love was an incredible thing, and I will never forget that, or him.

Thanks for listening! I know all of you folks reading this have done amazing things as well, and I’m looking forward to reading about them!

My “Why”

We  all have different reasons for getting up every morning.  Going to work can be another story, but a lot of us do it. I’d guess that “most” people go to get a paycheck, so they can come home and live their lives.

So why do I go to work where I do, and why have I left the jobs that I’ve left? Well, let’s take a short stroll down memory lane.

I started my career in a place that was mostly grant-funded, working on Early Childhood Education-related projects. We had a fairly decent tech crew to support the projects, but there wasn’t much focus on intentionally writing the funding for paying the technology staff into the grants. There are support dollars that are a portion of each grant that, when grants are plentiful, were enough to cover the tech staff. Unfortunately, when  grants started to dry up, the support dollars weren’t enough to cover all of the staff.  My boss was someone I respected, and the work was worthwhile and enjoyable, but I preferred to get a jump on a new job instead of risking a RIF scenario.

My second job was for a very small company, and one software package that I worked on helped support babies in the NICU. There was a lot of good feels there. Again, the person who mostly was my boss – not technically, I guess, but with whom I interacted with daily and who directed the course of what I was working on mostly, was someone who I both liked and respected.

Unfortunately, there was a big push to really grow the business, without understanding the limitations that sales were working under. Additionally, folks who weren’t living up to the new (ridiculous) sales quotas were “punished”, which lowered their ability to make new sales even more. And, upper-level management was promising customers functionality in timeframes that were extremely unreasonable given the resources we had available. The environment had become extremely toxic, and watching people I respected get treated poorly was the last straw.

Where I work now has had some fluctuations, both in staffing and organizationally. There were times when I wasn’t sure whether the job was still the right fit. But, I am again answering to someone I have a lot of respect for. I also feel like I am making a (slow, but) positive difference in the company, both in identifying process improvements that should happen, as well as performance improvements needed in the software.

So, I guess what it comes down to is that if:
1. I am working for someone I respect, whose values and direction I agree with, and
2. I feel like I am making a positive difference and my skills/knowledge are respected and appreciated
then I am happy to come in and work hard do my best for my team, my boss, and my company.  This may be simplistic, but it seems to work for me!

PASS Summit 2018 Networking Dinner

It’s that time again – PASS Summit!  Woot!  I’ll be organizing the Networking Dinner again this year – thanks again to Steve Jones (b|t) and Andy Warren (b|t) who organized it for several years and helped a lot of us meet a lot of other us’s  🙂

Grab some tickets here!

This event will be held on the Monday of PASS Summit – that would be Monday, November 5th.  We’ll meet at the Yard House restaurant in Seattle, which is a quick walk from the conference center. Pre con attendees and all other early arrivals, please join us!  You will have a chance to sit and talk to other conference attendees.  Dinner is not paid for by us though – that’s on you.

Hope to see you all there!

 

The Death March

I’m, um, writing this for a friend. Yes, that’s it.
A friend. Or maybe a friend of a friend. We all know this friend, though. I’m sure you have one.  Anyway, Jeff’s (b|t) topic reminded me of a story my friend was just telling me, and it seemed like the perfect time to pass it on.

So, my friend was working on a project for a nursery who supplied landscaping companies. Another flavor of the software her company supplied was for orchards. As such, there wasn’t much place for plant information, just tree information. There was an EAV table though that allowed for many custom attributes to be added. So the customer had set up attributes for the plants in an order in the EAV table.

The customer then purchased the nursery supply sofware, and my friend got tapped to help the customer … smooth the way from how the data was imported into the old version and tie into the newer version.  There were two additional tables with the nursery supply version of the software, so my friend thought she could write a trigger to push values that came in from the import through that EAV table to rows in the correct new tables. (Even though triggers make her shudder.)

This sounded pretty easy until she discovered a problem: all the reports were tied to the EAV table, and the customer expected any changes in the new tables to push back to the EAV table so the reports would still work. Yipes!  And of course, the EAV table was one of the busiest in the database.  Additionally, this forms a horrible circle of trigger looping hell.

My friend was very clear to both her project manager and the customer in question that she felt that this was a poor idea, and that this could have a significant negative impact on the database. She agreed to develop it though and put it into a UA environment for the customer to test thoroughly.  The final solution ended up being fiiiive new triggers, 4 sanity brakes, three staging tables, two tables from the new version of the software, and a job calling a stored procedure. Oh, and the original EAV table. (Phew.)

Each set of triggers that populated any of the staging tables checked backwards to see if the record came from the previous staging table(s). If it did, it ignored it and didn’t continue to push the record forward. The job was for the final push from the EAV staging table into the EAV table, to avoid many incremental inserts/updates and instead do those in a batch.

Although the final verdict of this whole mess hasn’t played out at this time, both my friend and their customer weren’t very confident that this was going to be a success. There were additional issues such as data not being able to be definitively mapped, questions about how the data was imported into the EAV table, etc. I’m pretty sure I know what the endgame for this project is.  Well, there are a few different varieties but all of them resemble a train wreck.

For all of you out there currently working on one of these, my friend and I feel your pain. Best of luck!

Passion

Thanks to Aaron Bertrand (b|t) for a great topic to encourage me to make my first foray into T-SQL Tuesday, which I should have done a long time ago.  And thanks, Gene (b|t) for the inspiration as well!

So.. passion. That’s what makes us so special as a community. There are so many people that have true passion – for knowledge, for sharing that knowledge, and for building and supporting our community. And I, for one, was surprised to find that I had a passion for data. It was a pleasant surprise to find out I loved what I was doing and that I could feel so strongly about .. well, you know, boring data!

But… being a DBA and performance tuner isn’t what defines me. There is something else that is my sanity, my self-confidence, and my passion. And, lucky for me, that community is as awesome in it’s own way as the SQL Server community is. I am… a three-day eventer.

Huh? Well, to break it down to it’s simplest form, I ride horses. Or, at least right now, horse. And yes, although most of you who have talked to me for any length of time know this, you’ll also notice that I don’t talk about this much. Yeah, I still get the high-school-like jokes about glue and dog food when I talk about this with non-horsey friends. It’s kind of like talking performance tuning with non-SQL people. It’s better to just not do it.

But, why is riding horses so great? Well, because it’s all about building a partnership, and hard work, and focus. If you want to be good (and most of us keep working at getting better all the time), you need to put the effort into it. This isn’t much different than other things, but there’s two of you – two of you to work on things, two of you to keep in shape, and two of you to keep healthy and happy. But, then you always have a partner – you build trust and respect, and if you’re lucky, love. And an escape from the rest of your life, because sometimes, we all need to do that. At the barn, I can step away from everything that may be going wrong elsewhere.

OLYMPUS DIGITAL CAMERA

There are three parts to a horse trials; the first is dressage, which is the equivalent of a dance routine on horseback.

The second part is cross-country, a course of solid natural obstacles ridden at speed. The third part is stadium jumping – a course of rail fences that require agility and scope. Being good at one of these things, let alone all three, is a challenge. Add to this the fact that your partner is a 1200-pound animal who doesn’t always agree with you, and it can be… interesting. Humbling, certainly. And, absolutely incredible!

I had my first horse for 20 years. He was my best friend and my strength through cancer, two marriages, building a career, and everything in between. We never rocked the competition world, but I learned so much from him. He had a rough early life, and had a difficult time trusting people. Although it took time, I earned his trust and his love. As the years went by, we became a stronger and stronger team, and we did amazing things. Unfortunately, his legs weren’t as strong as both of our personalities. I laid him to rest a little less than two years ago, and I will never stop missing him.

I have a redheaded youngster now, who is wonderful in his own way. We both still have a lot of rough edges together as partners, though. Hopefully in a couple of years, we’ll manage to rub those off and be able to trust each other totally. Meanwhile, we’ll keep working on little things like convincing Ben to let go through his back, and me remembering to keep my heels down, both seatbones in the saddle, and my shoulders back. Always with the shoulders back 🙂

Thanks for listening!

 

The T-SQL Tuesday Post I Should Have Written

The November 2017 topic for T-SQL Tuesday was “Folks Who Have Made A Difference”.  And, although I don’t really have a good excuse to not have gotten this written on time, I still want to thank those who have made a difference for me regardless.

The first thank you goes to Steve Ingalls (known to most of my friends as Channel 0 Steve). He engaged me in my first professional database project – redesigning the chemical inventory database for the research branch of the Cleveland VA Hospital. It was a summer project between college years, and it was in (I know, I know *wince*) Access, but the guidance he gave me stood me in good stead then and ever since, as does his continued wisdom and humor.

The next shout goes out to Cheryl Johnson, who was my boss for many years while I worked for The Ohio State University (well, a small section of a segment of.) She allowed me to make mistakes and encouraged me to learn from them. I learned from her to take time in my work, which resulted in pride in what I created or helped create. She also showed me that women have a very definite place in the technology world.

That brings us to the the people who showed me #sqlfamily, including the best hugs ever.  I had the honor to be in Allen White’s Powershell precon at my first PASS Summit. (@SQLRunr) We connected because I might have been the smartass in the front row who likes to talk to presenters when they ask for audience participation. Allen has been nagging supporting me to become more involved with PASS and to give back to the community.  His encouragement has really meant a lot as I try to find ways to become involved – I’m not comfortable with public speaking, but maybe I’ll get there…. someday!

And last but by no means least, thank you to Mindy Curnutt (@sqlgirl). She and Eric Blinn (@SQL2TheSequel)  built up the dream team in our DBA Services group – each one of us had good basic skills, and exceptional skills in certain areas. I learned for the first time what it’s like to really work in a team of great people, and that I was valued for my contributions. This is no small thing. She is involved in many different activities and is inspiring in her work.

Thank you, all of you – for your support, for sharing your knowledge, and for being my friends.