Query Performance, Work-Life Balance, and the Unpredictable World of Presales
SPRING BREAK?
Spring Break always reminds me of a specific moment in time when work and life seemed to come together in just the right ratio, each improving the other in the process.???
I had moved to Presales from Professional Services a few years earlier with the thought that I would be on the road less and thus able to spend more time with my young children.?The travel part was correct.?But finding time for everything that needed attention remained a challenge.??
At the time, I was just starting to adopt a "work-life-integration" strategy, which explains how I found myself at a state park lodge, sitting at a pool-side table with my laptop , watching my kids laugh and swim with their cousins.?
However, to understand why I was trying to convert a thousand lines of stored procedure code into a single SQL query, we need to look back a few years.
?
JOINING PRESALES
I moved to Presales the year SAP HANA was released, joining a brand-new team of database experts created to support this brand new, columnar, in-memory database.
SAP's messaging around HANA focused on one claim: it was blazing fast.?And we quickly learned that this claim was absolutely true.?We saw sub-second performance on certain queries that took hours or days to run on other systems.??
The caveat, of course, was that this performance required the right conditions.?And we found early success by being able to identify these conditions, usually with data modeling and partitioning strategies, and match them to customer use cases that could immediately benefit.?
The ongoing challenge was to figure out how to create the conditions, if they didn't exist, for new customer use cases, and then to adapt what we had learned into a solution that could be used for other customers.?
We were seeing a lot of DB logic coded in stored procedures - and we figured a solution to this could be impactful.?So we went looking for a good customer use case we could tackle and then use as an example for other customers.??
We found one the week before my family’s scheduled spring vacation.?
?
FINDING BALANCE
There are two features of presales’ work that make it unique: Nearly all work is done remotely, and the timing of the effort is hard to predict.
This makes some things easier.?For example, you can just take your dog to the vet or run to get your dry cleaning without having to leave the office or schedule time off.??But trying to plan a vacation where you can turn off your phone and relax is difficult.?
领英推荐
If it is difficult for someone to balance these two things, then presales might not be a good fit.?If they can, it could turn out to be the best job ever.??
At that moment, working on a query performance issue, hearing my kids play Marco Polo in the pool, I felt like I had found the perfect balance.?And maybe I had.?For a brief moment.
But finding balance is never the real challenge.?What matters is what you do when you find it - and what you do when you realize that you have lost it.??Both require vigilance - some humility - and the ability to hear and interpret signals and signs from the universe.
?
LISTEN TO THE UNIVERSE
My coworker and I had a breakthrough in the afternoon that moved us ahead by leaps and bounds.?This was a huge break for us.?We now knew for sure that we could solve the problem - and in less time than we thought.
Yes, we would have to go back and redo a lot of work—and then reanalyze some important decisions we had made—but the time pressure was greatly reduced.
This was an obvious place to stop and rebalance.??But I missed that.?Instead I opted to excitedly jump out of my seat and attempt some kind of victory dance.??
It was at this point that the universe issued a strong reminder—sending my laptop flying through the air and landing inches from the water.??
I immediately recognized the out-of-balance warning, promptly closed my laptop,?and jumped in the pool with my kids.?Later we made s'mores by a campfire.?I crashed out early - and woke up early - and had a big breakfast before opening my laptop again.
And that's the key to the second part of the lesson. Everyone makes mistakes and falls out of balance. What matters is how quickly we realize it - and how well we can recover.
The next day we came back and breezed through the rework.?We got the query running in seconds - far exceeding expectations for this stored procedure- which had previously taken up to eight hours to complete.??
?
I TOLD YOU SO
Years later, I was sitting in a customer session at SAP's huge user conference in Orlando, and the presenter mentioned how they had given SAP presales the most difficult problem they had- a performance problem with stored procedures - and how the unique solution helped them decide to stay with SAP and invest in the next generation of products.
The universe usually works in mysterious ways.??
But on occasion, it says?“I told you so.”
Great story!