Wearing two hats, emotionally.

How many times at work have you heard, or said, “Let me switch hats for a second…”

This refers to the concept of “wearing many hats,” or juggling several roles at once.  For example, in my current role, I’m both an individual contributor and a manager.  Sometimes in team meetings I’m in a peer role with my team, sometimes I have to “switch hats” and say something managerial.  While others might not be aware I’ve made the switch, I am very aware.  Other hats I’ve experienced include: being both an operational dba and db developer and being both a dba and project manager (ugh).


There are many other ways we wear multiple hats in life.  Are you an employee but also a parent? Spouse? Partner?  Do you go to school part time? Full time? You are still a child or sibling of others.  Maybe you run volunteer efforts after work. Maybe you play in a band.  


Frequently, (for me, anyway), saying “I’m switching hats,” is woefully inaccurate.  The reality is, instead, I have all these hats piled on my head at once.  Perhaps there is one showing at the very top.  That’s the hat in focus, if you will.  But they are all still here simultaneously.  


Imagine standing on the sidewalk.  You see a horrific car accident in front of you.  You have witnessed the car accident.  There are participants who are injured, and they are carried from the scene by ambulance.  You tell the officer what you saw, and you go home shaken, but healthy. In this scenario there is a very large distinction between the roles.  There are participants. There are witnesses.  


When I talked about “gestating your sad baby” previously, one of the reasons this technique works is because it makes you a “witness” to the emotion.  You are still a participant in the emotion, however. You are both. You are the participant, and at the same time, you are the witness.  Visualizing “gestating your feeling baby” doesn’t stop the emotion.  It incorporates both roles at the same moment.  Bring the car accident analogy back to mind.  Pretend you are still the witness, but this time you are sprayed with shattered windshield glass. You are bleeding. You need medical treatment, too. Now you are a participant. You are both roles simultaneously.  


Next bring to mind being in a meeting with developers who say they want to use the “jaywalking” sql anti-pattern, (comma separated lists in a column instead of an intersection/associative/linking table).  Your operational dba side is there, too, and comments on what a generally bad idea this is for your transactional db.  At that moment you are both dba and db developer.  We walk around through our lives with all our hats piled on our heads.  We are a melting pot of all our roles.


Kyle Cease (who is a bit out there but  still has a lot of good points), likes to say, “we aren’t here to feel happy, we are here to feel fully.”  And this is so, so, so true.  The goal of the “feeling baby” isn’t to make the feeling go away. The goal is to be a space for the feeler (you) to process the emotion, but also be the witness (yep, still you), of the feeler doing its thing.  


This is very hard for black and white, all-or-nothing people.  We want to believe we can have only one hat on at any given time.  Having been there myself, I invite you to look at your resistance to this concept as a good place to practice witnessing an emotion while feeling the emotion.  

Gestate your Sad Baby.

This was an email I wrote to a friend who was having trouble processing difficult/overwhelming feelings.  As an adhd person, emotional regulation is very difficult.  I developed this weird way of helping myself through rough patches:


Ok, first of all, I know this is crazy.

Don’t think less of me, but this totally works for me for a lot of reasons.
When I am having a feeling that is “negative” – I’m sad or lonely or angry or disappointed…for me, I feel it in the pit of my stomach.  I will visualize I’m “gestating the <feeling inserted here> baby.”
Let’s say I’m sad, for example:
I will visualize a baby in my womb. It is a “sad baby.”  And I am surrounding it with love, comfort, care, and creating a safe space for it to stay and gestate as long as it needs to.  Babies, for the most part only come out when they decide they are ready.  Babies, are not US, they are temporarily residing in us. We carry them around, day and night, a safe space for them as long as they need it.  We don’t overly identify with the baby we carry. We don’t think we are carrying ourselves.  However we overly identify with our feeling. “I AM sad.” “I AM mad.”  When we are pregnant we ratchet up the self-care.  We feed ourselves healthy food. We get plenty of sleep.  We avoid things that are not good for our baby.  If you visualize you are gestating this sad baby, lonely baby, angry baby, jealous baby, anxious baby…you are taking responsibility for it, and do so by caring for yourself at a very very high level. You are gentle with yourself.  Gestating a baby is hard work.  I will hold my belly as if there is a baby in there. I will talk to it. “I’ve got you. Stay as long as you like. I’m surrounding you with love.”
This TOTALLY works with fear babies, too.  Fear of the unknown is huge.  Fear babies are especially in need of a safe womb to gestate in.
Break out the pickles and ice cream!

There are no bad queries…right?

I’ve worked with developers who write terrible, extremely questionable, queries. I’ve said many times over the course of my career, “That’s a bad query.” You know the saying about there not being any bad dogs, right? Only bad owners? What if that’s true for queries? What if there are no bad queries, just bad environments for queries, or bad data sets for a certain query, or a bad plan for a good query? Maybe it’s about the data/query/environment interaction more than the query itself?

As with everything SQL, I started thinking about that in the context of psychology…

Psychology tells us the individual both evokes and provokes the environment (including others in the environment) in which it finds itself (person-environment interaction). However, there is an even cooler concept (that freaks me out a bit), that we self-select environments that we are in. Meaning…we choose the shit storm we blame for our unhappiness.

Pardon me for a minute.


The asshole coworker? Not your fault, right?

Well, not so fast.

Let’s weave these together.

What if you have a query that runs great on a table with 10 rows? And then you move it to prod where there are 2.8 billion rows? What if it is on a laptop with 1gb of RAM allocated to SQL? What if it’s also running 85 other things just then?Bad query, or bad environment? Both is an option, too, of course. (If you said “bad dev environment,” you get a gold star!) What if you add indexes? What if you update statistics? What if you switch to columnstore? What if you put it on a grown-up server? What if you add a ton of RAM? What if you cache the table? What if you make the table in-memory? These could all be said to be environmental design to improve execution of the query because you’ve changed nothing with the query itself.

This is what happens to DBAs a lot. Queries come to us and are not able to be edited (third party software, grumpy developers, whatever). We then set about tying ourselves into knots to create an environment where that “bad query” can thrive.

People are like this, too, I feel. Sure, there are “bad” humans. Serial killers, for one come to mind. Narcissists are another. However, the vast majority of people mean to do their best. We try hard, maybe not for all the right reasons, but very rarely do most people set out to do harm to others. Some environments, some people in those environments, generate such a reaction in the individual that the literal worst comes out of them. Sometimes this means people need to remove themselves from harmful environments (or better yet, the toxic people should be removed), but other times (just like query tuning) environmental design can make a huge difference.

How can we go about improving a poor interaction? It’s the same process as for query tuning, actually. Observe. Detect patterns. Here you have two options (just like with SQL Queries):

Work backwards to find root cause, address root cause.


Take a stab at what you think might help (up the RAM!), observe again, record the results. Then tweak and try again. Sometimes you make the interaction worse, sometimes better. All results inform our future choices.

I’ve recently had the opportunity to observe a couple of significant workplace behavioral issues. Where I used to get extremely upset, I’m now able to observe and say, ok, what’s the pattern here? Sometimes what I come back to is yet another concept in Psychology that we are most disgusted by traits in others that we have and hate about ourselves. Having spent a long time in therapy, and worked through a lot of cognitive distortions, when I see them in others it’s like a huge sign flashing over their heads. The interesting thing is, I will feel dislike way before it clicks why.

So, let’s bring it back to what I said earlier…we self-select our environments. If I accept a job only to find out later I clash with someone, the question I ask myself is…Why did I choose that job over others without team members with this characteristic? Then I ask, “What in me has that trait that I’m not in touch with?” Finding yourself in a person-environment interaction that triggers all your vulnerable spots should be an invitation to understand those places on a deeper level.

Sometimes fixing a bad query (or person-environment interaction) is about environmental design. You leave the bad job, you beef up your server, you defrag your indexes…whatever it takes. Sometimes it’s about rewriting the query, though. You look at how you can get more efficiency out of the TSQL and reduce I/O. Sometimes you look at your own issues and how they evoke and provoke others.

Sometimes, it’s all of the above.

When you can rewrite the query, update statistics, and add more RAM, you do.

When you are able to extract yourself from unhealthy environments AND leverage those experiences to understand why you self-selected such a situation, why you stayed in such a situation for any length of time, and what you can do in the future to handle it differently…you do. You rewrite your own damn query.