In Search of Answers

Yesterday evening my database server let me know that there were a couple of updates available that would fix a few bugs in various pieces of software and, because the updates looked tame enough, I opted to skip any sort of testing. A quick series of keystrokes later, the machine was quietly updating itself. Generally when there are just a handful of updates available, the entire process finishes in under a minute and the system just keeps on going. Yesterday, however, was different. This update required almost two minutes and, after completing, all of my web-based tools were terribly slow. Something was clearly wrong.

The culprit was quickly narrowed down to an upgrade for MySQL that brought it up to version 8.0.19. I quickly started looking around online for possible reasons this might happen, but nothing jumped out for this particular version. The general advice was all so generic: rebuild the tables and recompile the stored procedures. Unfortunately, neither of these suggestions made any difference whatsoever.

In time I was able to narrow the situation down to the following condition:

When a stored procedure is populating a temporary table through a source query that uses a CROSS JOIN within a nested query, performance dramatically drops.

By drastically, I mean something that generally takes 33ms in isolation would take over 7,750ms in the stored procedure … which is almost 8 full seconds. Considering the stored procedure in question is called about 40,000 times a day, this was something that needed to be fixed right away.

Fortunately a quick little rewrite of the one query brought performance back across the system and everything was good to go. I'll use this as a reminder to not use a CROSS JOIN to cheat when building dynamically-sized tables that requires a sequential ID.

Technical solution aside, though, an odd parallel is happening in my personal life as I seek answers to questions that run very deep.

For the better part of six months I've been re-introducing religion into my life by reading a great deal of books that analyse and discuss the books that built western civilisation, primarily the Christian Bible and the Jewish Torah. In my youth I had studied both Christianity and Islam to a certain extent, but not enough to lead a decent sermon. The problem that I faced was similar to one that a lot of people recognise as they begin to specialise in a subject: the more you learn, the less you think you know. This was certainly the case with these two religions, as the depth and breadth of study is so vast that a single person could not hope to learn everything in a dozen lifetimes, let alone when they're still a child1.

What I seek is a direction to travel.

My family consists primarily of armchair Christians, some of which will attend Sunday services most of the year. They will say they are Christian, then immediately do something that blatantly contradicts the statement. The friends and acquaintances I've had over the years who have called themselves Christian are similar in many regards, the one exception being Pentecostal Christians. The services I've attended at Pentecostal churches have left me marvelling at the level of devotion some people displayed while also feeling terribly inferior as a result of all the questions that I had at the time.

Later I tried Catholicism, joining a church and being ordained as a deacon. There were studies that had to be performed, ceremonies attended, masses conducted, and people met. The rigid structure of the church seemed like something I might thrive in, but this was not to be. While the worshippers were generally genuine people, the politics in the organisation soured the perception of sanctity. No House of God, in my mind, would tolerate petty squabbles for decades at a time between people in an attempt to curry favours and accumulate power, after all.

Modern Canadian Christianity and Catholicism just didn't seem to work for me. I needed something different to better understand the universe and my role in it.

A few years after moving to British Columbia I had made friends with a number of Muslims who were some of the most honest and down-to-earth people I had ever met. We would often meet for coffee and talk about world events and, of course, religion. I wanted to learn more about Islam and how it differed from Christianity. In time I started to attend discussions, prayers, events, and khutbahs at musallas and mosques. This was an interesting time but, as I started to participate more, there was an expectation that I commit more. However, in the back of my head, there was a voice saying "this isn't for you".

In the end I left the community, then later the country.

Here in Japan I've gone the better part of a dozen years of "quietly observing" the basics that I was taught as a child. Prayers before eating. Resisting temptation as much as possible2. Obeying the precepts that align with the version of Christianity I was taught as a young child. So long as one follows the Ten Commandments and does what is deemed right, they're good … right?

Many people can lead a good life, either as an agnostic or atheist, and be perfectly content. For a while I could, too. This past year — and perhaps even longer — I've felt that there's something I'm not doing. It's as though I am missing a fundamental piece of me; something important.

So I'm reading books on religion again, looking for answers to the questions that have been unfulfilled for decades, and trying to find the most accurate source of wisdom and God. Oddly enough, I might have found it.


  1. I don't think I became an adult until my late 20s or early 30s. It wasn't until the boy came along that I actually started to feel like one, though.

  2. Not very well, mind you. Temptation comes in many flavours.