<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-375697951860081841</id><updated>2026-05-21T12:51:24.150+01:00</updated><category term="MySQL"/><category term="PRIMARY"/><category term="database"/><category term="business rules"/><category term="Jobs"/><category term="caching"/><category term="idea"/><category term="China"/><category term="Google"/><category term="Indexes"/><category term="Microsoft"/><category term="Oracle"/><category term="SQL"/><category term="DBA"/><category term="Data mining"/><category term="PHP"/><category term="Views"/><category term="business"/><category term="configuration-management"/><category term="data warehousing"/><category term="event-driven publishing"/><category term="open source"/><category term="pentaho"/><category term="Agile"/><category term="Data"/><category term="Decision tree"/><category term="DevOps"/><category term="ETL"/><category term="Email"/><category term="Excel"/><category term="Health"/><category term="Industry"/><category term="Locks"/><category term="MS SQL"/><category term="MariaDB"/><category term="Programming Lanugage"/><category term="Reports"/><category term="Security"/><category term="TMPFS"/><category term="Windows"/><category term="decision tables"/><category term="expert system"/><category term="federated tables"/><category term="informatica"/><category term="linux"/><category term="talend"/><category term="triggers"/><category term="ubuntu"/><title type='text'>DB Performance</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>153</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-7638358344037316532</id><published>2021-06-15T11:29:00.006+01:00</published><updated>2021-06-18T00:58:03.047+01:00</updated><title type='text'>Business Values: Simplicity</title><content type='html'>For the longest time, I felt that simplicity was either underrated or entirely unmentioned in business&#39;s mission and value statements.

&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-xymHbvjIkyQIepetH2uDyfTjtCUGmsSDOVrj864N7BKAKNWBJxDurNu0HnUCEMOOxfYeDWBk01IOl-CtkaxWXK_IKJUWhxSXNk09SVc2d6B3p3uMdf3WPuw60hPM_GZ0BMRcJzzHQfE/s1408/Screenshot+2021-06-17+at+17.43.23.png&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;766&quot; data-original-width=&quot;1408&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-xymHbvjIkyQIepetH2uDyfTjtCUGmsSDOVrj864N7BKAKNWBJxDurNu0HnUCEMOOxfYeDWBk01IOl-CtkaxWXK_IKJUWhxSXNk09SVc2d6B3p3uMdf3WPuw60hPM_GZ0BMRcJzzHQfE/s320/Screenshot+2021-06-17+at+17.43.23.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;p&gt;
&lt;/p&gt;&lt;div style=&quot;text-align: left;&quot;&gt;The first person I saw promoting simplicity was Steve Jobs. He was known for meticulously designing and expecting that Apple products be made as simple as humanly possible. However, even after everyone has had an Apple product in their pocket at one point in their life, businesses still find the concept of simplicity to be so elusive or perhaps vague that it somehow fails to considered as an important value.&lt;/div&gt;
&lt;br /&gt;
I would like to take this opportunity to explain conceptually, why I think simplicity should be a value for your business and what a focus on simplicity could result in.&amp;nbsp;&lt;div&gt;&lt;br /&gt;
In the early 2000s, I heard a line from a conference about software development: &lt;b&gt;Simple isn&#39;t Easy&lt;/b&gt;.&amp;nbsp;
I took that statement to mean that making something complex into something, is hard. You need to take the time and mental effort to make a complex concept into something that is understandable and digestible.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The result should be that you and others only need to comprehend the essence of the concept and then can competently use it.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
It is a considerable task, but one that moves us forward in our complex world. We need to simplify complexity just so that we can see the way forward. Once the path is clear, things are.. well, simple. And we as humans, like simple.&amp;nbsp;&amp;nbsp;&lt;div&gt;&lt;br /&gt;
In fact, we find a high degree of complexity destructive. The archeologist Joseph Tainter came up with a thesis in his book “the Collapse of Complex Societies”. He argues that societies like the Ancient Romans, Egyptians and Mayans collapsed due to complexities that were not able to be addressed at the time with a lack of people who could be able to read, do math and keep up with complex laws.&amp;nbsp;&amp;nbsp;&lt;div&gt;&lt;br /&gt;
Complex product design can kill too. I recall in University reading about a medical radiation machine that had such a complex array of buttons on its interface that operators gave patients x300 more radiation than was required (the Therac-25 in 1986).&amp;nbsp;&lt;div&gt;&lt;br /&gt;
So what we need to do is remove complexity where we can - certainly not add it - and abstract complexity where we cannot.&amp;nbsp;&amp;nbsp;&lt;div&gt;&lt;br /&gt;
Unfortunately, we sometimes do this process wrong. In that same period in the early 2000s, there was a movement in the software development community that preached &#39;optimising for developer happiness&#39;.&lt;/div&gt;&lt;div&gt;&amp;nbsp;
&lt;br /&gt;
During this time, some innovations came around that abstracted away - a form of simplification - the developer&#39;s need to understand what the underlying hardware was doing. This let the industry be able to focus on simplifying concepts in the software layer itself. Developers would only need to focus on recurring patterns that solve familiar business or software requirements and do away with the consideration of how that software would need to eventually run on the hardware.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
While this abstraction and simplification did optimise for developer happiness, the resulting software was not optimised to run on hardware. Some new developers did not even learn how the hardware works “under the hood”.&amp;nbsp;&lt;div&gt;&lt;br /&gt;
This lead to many years of lost productivity fixing (now legacy) applications to work better with hardware. All the while competing with time allocated for higher business priorities to release new product features.&amp;nbsp;
&lt;br /&gt;
Fortunately, today - and only recently - software developers are realising that in order to simplify a complex concept, you need to consider all its relevant moving parts. There is a new movement using a new language that is considered to have a &#39;hardware/software co-design&#39;. It has shown that once you really understand a concept and its scope, you can come up with innovative (“zero cost”) abstractions that make the entire industry move forward.&amp;nbsp;&amp;nbsp;&lt;div&gt;&lt;br /&gt;
Lastly, I won&#39;t be able to end this post that started with Steve Jobs without talking about simplifying your focus. Jobs was known to relentlessly discard to-dos and ideas that were not relevant to the most essential and beneficial thing he could do. My understanding is that he practiced this and encouraged his colleagues to as well, until it was painful. Once you and your team are focused on a very narrow and simple outcome, the chances of achieving it increase dramatically.&amp;nbsp;
&lt;br /&gt;
So, in conclusion and keeping inline with the theme:
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Simple isn&#39;t easy.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Complexity kills.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Zero cost abstractions.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Simplify your focus.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;



&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/7638358344037316532/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2021/06/business-values-simplicity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/7638358344037316532'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/7638358344037316532'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2021/06/business-values-simplicity.html' title='Business Values: Simplicity'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-xymHbvjIkyQIepetH2uDyfTjtCUGmsSDOVrj864N7BKAKNWBJxDurNu0HnUCEMOOxfYeDWBk01IOl-CtkaxWXK_IKJUWhxSXNk09SVc2d6B3p3uMdf3WPuw60hPM_GZ0BMRcJzzHQfE/s72-c/Screenshot+2021-06-17+at+17.43.23.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-238238826857225136</id><published>2021-06-11T10:35:00.006+01:00</published><updated>2021-06-11T11:38:05.485+01:00</updated><title type='text'>Reducing RDS costs</title><content type='html'>&lt;p&gt;&amp;nbsp;I wrote an article about &lt;a href=&quot;https://shatteredsilicon.net/blog/2021/06/10/how-to-reduce-rds-costs-on-aws/&quot;&gt;reducing RDS costs&lt;/a&gt;. Usually, for MySQL RDS, but can apply more generically. Hopefully, you will find it useful.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/238238826857225136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2021/06/reducing-rds-costs.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/238238826857225136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/238238826857225136'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2021/06/reducing-rds-costs.html' title='Reducing RDS costs'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-6423122754544542807</id><published>2020-05-25T21:34:00.000+01:00</published><updated>2020-05-25T21:57:16.880+01:00</updated><title type='text'>How to Evaluate which Concepts in Tech are Good</title><content type='html'>For a new concept in tech to be considered &#39;good&#39;, in my opinion, it would have to have the following characteristics:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Helps the Developers&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The concept has to help the developers of tech systems, do their job faster, smoother and/or easier. &quot;Optimize for developer happiness&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Helps the Hardware&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The concept has to help the underlying hardware complete the work it needs to, faster, smoother and/or easier with less resources. You cannot ignore reality and whatever runs on the hardware &lt;u&gt;is&lt;/u&gt; reality.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Helps the Business&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The concept has to help the business run faster, smoother and/or easier. This can also be seen as the end customer get better value.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Helps Make Things Simpler&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
The concept has to thoughtfully remove complexity from tech systems. If they cannot remove it fully, then they need to abstract it with zero or few costs and few interface points. &quot;Simple is not easy&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Integrates with Other Concepts&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Does not contradict other existing concepts or if it does, are those other concepts &#39;good&#39; and on what premises were they formed?&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/6423122754544542807/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2020/05/how-to-evaluate-which-concepts-in-tech.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6423122754544542807'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6423122754544542807'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2020/05/how-to-evaluate-which-concepts-in-tech.html' title='How to Evaluate which Concepts in Tech are Good'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-6469742780299438668</id><published>2020-02-01T20:08:00.000+00:00</published><updated>2020-02-01T20:08:34.065+00:00</updated><title type='text'>How to Make MySQL Cool Again v3.0</title><content type='html'>&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;In-built columnar storage engine that works next to Innodb on the same DB server.&lt;/li&gt;
&lt;li&gt;Materialized views - async and semi-immediate&lt;/li&gt;
&lt;li&gt;Recommended indexes based on query usage&lt;/li&gt;
&lt;li&gt;Rename CREATE PROCEDURE to CREATE DATABASE API. Yes, really.. just rename it.&lt;/li&gt;
&lt;/ul&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/6469742780299438668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2020/02/how-to-make-mysql-cool-again-v30.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6469742780299438668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6469742780299438668'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2020/02/how-to-make-mysql-cool-again-v30.html' title='How to Make MySQL Cool Again v3.0'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-7781371853941644301</id><published>2019-10-14T16:12:00.001+01:00</published><updated>2019-10-18T23:02:32.983+01:00</updated><title type='text'>How Do Software Systems Become Complex and What Can You Do to Prevent it</title><content type='html'>Why does everything have to be so complicated?&lt;br /&gt;
Wouldn&#39;t it be nice for once, to have a simple and clean system that you can run or make small changes to?&lt;br /&gt;
&lt;br /&gt;
But how is it that systems get complex to begin with and how can we avoid it reaching that stage?&lt;br /&gt;
&lt;br /&gt;
In order to answer that, I need us to have a common language and explain a concept called &quot;crow epistemology&quot;. Epistemology is the philosophical branch of the acquisition of knowledge. The crow part referres to an experiment done with crows many decades ago:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
The experiment was conducted to ascertain the extent of the ability of birds to deal with numbers. A hidden observer watched the behavior of a flock of crows gathered in a clearing in the woods. When a man came into the clearing and went on into the woods, the crows hid in the tree tops and would not come out until he returned and left the way he had come. When three men went into the woods and only two returned, the crows would not come out: they waited until the third one had left. But when five men went into the woods and only four returned, the crows came out of hiding. Apparently, their power of discrimination did not extend beyond three units--and their perceptual-mathematical ability consisted of a sequence such as: one-two-three-many.&lt;/blockquote&gt;
&lt;br /&gt;
We humans, are also limited to the number of things we can hold in our head at any one time. Here lies the (human) issue with complexity. For us to make computer systems less complex, we need to take steps as to only allow for a small number of things or concepts to take up space in our brain at any one time.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s look at a few types of complexities:&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Cyclomatic complexity&lt;/h3&gt;
Cyclomatic Complexity is a quantitative measure of the number of linearly independent paths through a program&#39;s source code.&lt;a href=&quot;https://en.wikipedia.org/wiki/Cyclomatic_complexity&quot; target=&quot;_blank&quot;&gt; It was developed by Thomas J. McCabe, Sr. in 1976.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;IF statements.&amp;nbsp;&lt;/b&gt;Too many IF statements make an application complex. Each &#39;path&#39; of the IF statement needs to be &#39;rendered&#39; in your brain to have an overview of what the applications will do. In extreme cases, you can often reach the infamous &#39;&lt;a href=&quot;https://itnext.io/pyramid-of-doom-the-signs-and-symptoms-of-a-common-anti-pattern-c716838e1819&quot; target=&quot;_blank&quot;&gt;pyramid of doom&lt;/a&gt;&#39;. If your brain can only hold (on average) 5-7 things, then you are looking at either two variables in the IF statements or three boolean variables (2 options - true/false - to the power of 3 is 8). &amp;nbsp;Anything more than that, can be considered complex and will force people to stare at the screen for many minutes whenever they want to go over that code.&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Decision Tables.&amp;nbsp;&lt;/b&gt;An exception to this maybe a decision table, where those paths are &#39;pre-rendered&#39; and are therefore slightly easier to understand. But even with decision tables, too many options and you find yourself going down one path at a time, tracing the screen with your finger.&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;b&gt;Error Handling. &lt;/b&gt;A subset of IF statements can be included in Error Handling. Usually, you have the default way a class or function expects to get and process requests and when you include error handling into it, you get too many &#39;paths&#39; and the code becomes messy.&amp;nbsp;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Personally, I am interested to see how &#39;&lt;a href=&quot;http://www.valid4j.org/concepts.html&quot; target=&quot;_blank&quot;&gt;contract by design&lt;/a&gt;&#39; works for this use case, by off-loading error handling into other parts of the code. If my predictions are right, this could be what replaces a large chunk of Unit Tests in the future. &amp;nbsp;&lt;/li&gt;
&lt;li&gt;It is also, philosophically more inline with the original intent of Object Oriented programming. A human can &#39;run&#39; and &#39;eat&#39;, but a human also has limits on what it can eat and on what surfaces it can run. Specifying those constraints helps reduce complexity in other parts of the application.&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;b&gt;Function has too many lines of code.&amp;nbsp;&lt;/b&gt;It is simply difficult to understand what is going on. Maybe the original person who wrote it can understand, but not anyone else that need to make changes to that code.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;A class has too many functions&lt;/b&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;A class has too much logic in it.&amp;nbsp;Try using a Decision Object&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;b&gt;A class has too many dependencies.&amp;nbsp;&lt;/b&gt;This overloads your cognition in a similar way to IFs, because you need to &#39;render&#39; the dependencies to get an overview of what is going on, in your brain.&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Too many parts in your system.&lt;b&gt;&amp;nbsp;&lt;/b&gt;Too many moving parts, makes it difficult to figure out where issues are, as a general rule.&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;b&gt;Too many options for communicating with an API or interface or cli.&amp;nbsp;&lt;/b&gt;This isn&#39;t very obvious, but too many options is both difficult to develop and maintain, but also difficult for the user to understand how to use. It also makes it a more complicated dependency to interact with and test for.&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;Too many buttons on your website.&amp;nbsp;A corollary of point 6 is a busy website that is too complicated to understand how to use.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&lt;br /&gt;
As a side note, trying to solve a problem that has too many possible decisions to make, also counts as complexity for your brain. In cognitive science (but more math, really), it is call combinatorial explosion.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9OFjDSGlS4eFJogRG_4WDts2dChffwMkk6JZBBIlg75k5MixY6w5TcIAx-nCGRD6SUrrRYOz-RVSB3etbdRnGjrwWyimjQzivoo_8QZGDtRzQr4CLyDPVw8Ci7lJlla6sYxYsQ2vgtW8/s1600/images.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;184&quot; data-original-width=&quot;274&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9OFjDSGlS4eFJogRG_4WDts2dChffwMkk6JZBBIlg75k5MixY6w5TcIAx-nCGRD6SUrrRYOz-RVSB3etbdRnGjrwWyimjQzivoo_8QZGDtRzQr4CLyDPVw8Ci7lJlla6sYxYsQ2vgtW8/s1600/images.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h3&gt;
Castles on Quicksand&amp;nbsp;&lt;/h3&gt;
&lt;br /&gt;
Now that we have covered what humans might consider complexity, let us consider other forms of non-human complexity. Apart from making our code &#39;clean and simple&#39;, we sometimes need to factor in more parts of the terrain. Specifically, we cannot isolate ourself to just making the code aethstically pleasing and not question how the code would run on the metal underneath. How do the physics of of it work, at least in principle? How do we move 0s and 1s as fast as possible without causing bottlenecks?&lt;br /&gt;
&lt;br /&gt;
In philosophy, we call this &#39;evasion of reality&#39; and its becoming more and more common in the age of cloud computing - although, to be fair, the cloud pretty much plays a &#39;cha-ching&#39; sound whenever you do this.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s take a couple of examples:&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Flooding your database with single insert connections, instead of batching writes to it&lt;/b&gt;. Batching is the multi-threadiness of databases&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Array of Objects or Object of Arrays for performance.&lt;/b&gt; The gaming industry takes a more &lt;a href=&quot;https://theartofmachinery.com/2019/06/30/data_still_dominates.html&quot; target=&quot;_blank&quot;&gt;data-oriented design approach&lt;/a&gt; to get better performance as well as work on less powerful machines like mobile phones. Using Structs of Arrays, they are able to render more moving units on a screen with far less CPU cache misses.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;The Rust programming language using various principles for memory usage instead of a garbage collector. &lt;/b&gt;Rust uses innovative methods that help humans code without a garbage collector while making it a lot easier to manage lifetimes and data races.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
I would like to focus on the last example: in order to build efficient and clean computer systems, we need to use the principles discussed to make our code less complex AND integrate them with principles about how computers work best under the hood. Similar to how Rust does it - integration is the key.&lt;br /&gt;
&lt;br /&gt;
Once you have principles that consider both code complexity and system performance, you develop much faster, your code is simpler and you do not need to revist it in the future to make 50 more commits just to make it go fast. After 50 additional commits, nothing looks simple, anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Pragmatic Entropy&lt;/h3&gt;
&lt;br /&gt;
Lastly, we need to make sure that our system has integrity. Here, I mean that it was done right with core values and principles and that those were not deviated from during the development process. I mean here, to not let too many cooks spoil the broth and in particular, exciting spices from online blogs or conferences.&lt;br /&gt;
&lt;br /&gt;
If you do not keep a watchful eye for this, your system can get complex and random very quickly. If you have ever attended a meeting were this was raised &quot;why don&#39;t we do this? it&#39;s what all the cool kids use&quot;, then you will know what I mean.&lt;br /&gt;
&lt;br /&gt;
The problem with these situations, is that if you compromise (be pragmatic), you have already lost. You try to rush things out without hurting other people&#39;s feelings and soon you will get those annoying conversations with QA or the people who review your code that go &quot;why didn&#39;t you just do X instead? It is a lot simpler&quot;.&lt;br /&gt;
&lt;br /&gt;
The other cooks need you to compromise or they can&#39;t do anything. What do I mean?&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;If you were to say &quot;this is a bad idea, I wont do it.&quot; - they have lost &lt;/b&gt;and the integrity of the software system is safe (assuming you are following the right values and principles)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;If you were to say &quot;I agree to do this idea, but tell me exactly how to implement it&quot; - they have lost,&lt;/b&gt; because they have no idea how. They need to persuade you to do it and for you to implement their idea.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;If you compromise, they have fully won&lt;/b&gt;. They get the latest technology into the system and you have to implement it, test it and maintain it going forward. You have at that point, introduced complexity into the system.&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;br /&gt;
If you ever read someone&#39;s code and ask &quot;why did they do it this way?&quot; or the more common &quot;wtf&quot;, it was probably because someone compromised.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
In Conclusion&lt;/h3&gt;
&lt;br /&gt;
For those of you that may have missed it, we have covered complexity in computer systems, but we have also done so in a complete philosophical framework. We have Epistemology (Cyclomatic Complexity), Metaphysics (Castles on Quicksand) and we have Ethics (Pragmatic Entropy) - we also have a slight mention of aethstics.&lt;br /&gt;
&lt;br /&gt;
I hope you have enjoyed it and that it helps you in your implementations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/7781371853941644301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2019/10/how-do-software-systems-become-complex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/7781371853941644301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/7781371853941644301'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2019/10/how-do-software-systems-become-complex.html' title='How Do Software Systems Become Complex and What Can You Do to Prevent it'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9OFjDSGlS4eFJogRG_4WDts2dChffwMkk6JZBBIlg75k5MixY6w5TcIAx-nCGRD6SUrrRYOz-RVSB3etbdRnGjrwWyimjQzivoo_8QZGDtRzQr4CLyDPVw8Ci7lJlla6sYxYsQ2vgtW8/s72-c/images.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-2739372980727586344</id><published>2018-11-19T11:46:00.001+00:00</published><updated>2018-11-20T10:06:29.157+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>Top 5 Reasons why you need a Data Expert in your Agile/Cloud-only Company</title><content type='html'>&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Setup blue/green database environments to streamline database deployments&lt;/li&gt;
&lt;li&gt;Help your team transition from a monolithic database to a microservice environment&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Setup testing environments with actual data to test against (eg, docker database containers with anonymised data)&lt;/li&gt;
&lt;li&gt;Improve the performance of your production databases&lt;/li&gt;
&lt;li&gt;Setup and populate reporting Data-warehouses/Data-lakes for fast and readily available analytics&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;h3&gt;
Worst 5 Things that can happen if you &lt;u&gt;don’t&lt;/u&gt; have a Data Expert in your Agile/Cloud-only company&lt;/h3&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Your production databases slow down your website/mobile apps so much that the developers want to take 3 months to off to migrate sensitive parts of your application to 3 new database technologies. You now not only need to maintain unfamiliar database technologies, you also need to fix support tickets like “why does it say the total is 50 here, but the total is 43 over there? Which one is right?”.&lt;/li&gt;
&lt;li&gt;Every time you deploy database changes after a few extra weeks of testing, everyone still holds their breath while it deploys.&lt;/li&gt;
&lt;li&gt;After a couple of years of hard work trying to move your monolith to microservices, only 5-10% of the database has been migrated. The momentum has stopped, because no one is willing to risk their positions and break key parts of the system.&lt;/li&gt;
&lt;li&gt;Your developers still need to test against the staging environment as that is the one that has data in it, but by then, all the bad database queries have already been written.&lt;/li&gt;
&lt;li&gt;After having 1 monolithic database and 20 silo’d databases sitting inside microservices, you now need to hire a data expert to go over all the mess and create a single place to run reports from. Otherwise, no one has an idea what’s going on.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/2739372980727586344/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2018/11/top-5-reasons-why-you-need-data-expert.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/2739372980727586344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/2739372980727586344'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2018/11/top-5-reasons-why-you-need-data-expert.html' title='Top 5 Reasons why you need a Data Expert in your Agile/Cloud-only Company'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-6074918062161617938</id><published>2018-10-16T14:30:00.001+01:00</published><updated>2018-10-16T14:30:50.818+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>Simple Database Design Rules</title><content type='html'>&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;Remove aggregated data from non-aggregated tables.&lt;/li&gt;
&lt;li&gt;Normalise and only denormalise with parent-keys (key enrichment)&lt;/li&gt;
&lt;li&gt;Consolidate new and small DB instances to a large DB instance in separate schemas&lt;/li&gt;
&lt;li&gt;Use DB Views for cross service data reading&lt;/li&gt;
&lt;li&gt;Use compound primary key when auto_inc id is not needed.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/6074918062161617938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2018/10/simple-database-design-rules.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6074918062161617938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6074918062161617938'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2018/10/simple-database-design-rules.html' title='Simple Database Design Rules'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-8812653597532953060</id><published>2018-05-01T11:28:00.000+01:00</published><updated>2018-05-01T11:28:11.890+01:00</updated><title type='text'>How to Implement Technical Change in an Organisation</title><content type='html'>&lt;i&gt;Your time is short and valuable, so I will not waste it on fluff. You would, however, need to take on these points and do more research on them, in the event that you like and agree with them.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
You are in a company and you see a glaring issue that you would like to solve. You have an idea or some experience that your solution might be helpful. However, its frequently difficult to implement change in companies (there are entire books and MBA courses on it). Sticking to IT/technical problems, here are 3 points that can help you implement technical change in an organisation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Social Capital&lt;/h3&gt;
&lt;br /&gt;
This could be &#39;understand politics&#39; or it could mean &#39;being friendly&#39; or it could mean &#39;being consistently reliable and hardworking&#39;. Either way, you can implement change by &lt;b&gt;spending &lt;/b&gt;your social capital.&amp;nbsp; Please note: you will not get this social capital back, even if your idea works amazingly well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
Expertise&lt;/h3&gt;
&lt;br /&gt;
If you are the expert in the area and you want to implement technical change, the resistance to your idea may be greatly reduced. Personally, I like giving presentation to people inside the company. Then if I want to make a change, the conversation would usually go this way: &quot;Hey, do you remember that presentation I did a while back? I was thinking of implementing one of the points I had in there. It wont take too long and I will make sure it works.&quot; &quot;What presentation? oh that one.. yeah, yeah.. sure. Just let me know when X is done and Y is finished&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
De-Risk&lt;/h3&gt;
&lt;br /&gt;
Usually, a lot of the resistance to change is due to the risk of something going wrong. If your idea carries certain unacceptable or high risk, try to reduce the scope of the change or remove some of the moving parts. The idea is to still implement the &#39;core&#39; of the technical suggestion or break it down into steps - where if the first step succeeds, then the second step would be less risky.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/8812653597532953060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2018/05/how-to-implement-technical-change-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/8812653597532953060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/8812653597532953060'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2018/05/how-to-implement-technical-change-in.html' title='How to Implement Technical Change in an Organisation'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-5238347122759704481</id><published>2018-04-04T09:22:00.000+01:00</published><updated>2018-04-04T09:26:33.545+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>MySQL Compression Olympics</title><content type='html'>And the results are in:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Innodb&lt;/b&gt; (no compression/original) - 660Gb&lt;br /&gt;
&lt;b&gt;RocksDB&lt;/b&gt; - 209Gb&lt;br /&gt;
&lt;b&gt;TokuDB (snappy)&lt;/b&gt; - 144Gb&lt;br /&gt;
&lt;b&gt;TokuDB (LZMA)&lt;/b&gt; - 67Gb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Benchmark performance with mysqlslap on production sample queries :&lt;br /&gt;
(8-9 Very quick SELECTs&amp;nbsp;+ 1-2 medium SELECTs)&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Innodb (original)&lt;/b&gt;&lt;br /&gt;
Benchmark&lt;br /&gt;
Avg: 0.100 seconds&lt;br /&gt;
Min: 0.091 seconds&lt;br /&gt;
Max: 0.182 seconds&lt;br /&gt;
Total: 5.101s&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;TokuDB (snappy)&lt;/b&gt;&lt;br /&gt;
Benchmark&lt;br /&gt;
Avg: 0.100 seconds&lt;br /&gt;
Min: 0.089 seconds&lt;br /&gt;
Max: 0.183 seconds&lt;br /&gt;
Total: 5.106s&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;RocksDB&lt;/b&gt;&lt;br /&gt;
Benchmark&lt;br /&gt;
Avg: 0.113 seconds&lt;br /&gt;
Min: 0.104 seconds&lt;br /&gt;
Max: 0.164 seconds&lt;br /&gt;
Total: 5.730s&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;TokuDB (LZMA)&lt;/b&gt;&lt;br /&gt;
Benchmark&lt;br /&gt;
Avg: 0.099 seconds&lt;br /&gt;
Min: 0.090 seconds&lt;br /&gt;
Max: 0.155 seconds&lt;br /&gt;
Total: 5.037s&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing Platform:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Platform&amp;nbsp; | Linux&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;Release&amp;nbsp; | CentOS release 6.8 (Final)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Kernel&amp;nbsp; &amp;nbsp;| 2.6.32-642.11.1.el6.x86_64&lt;br /&gt;
Architecture | CPU = 64-bit, OS = 64-bit&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Threading | NPTL 2.12&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Compiler | GNU CC version 4.4.7 20120313 (Red Hat 4.4.7-17).&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;SELinux | Disabled&lt;br /&gt;
&amp;nbsp;Virtualized | VMWare&lt;br /&gt;
&amp;nbsp; Processors | physical = 2, cores = 4, virtual = 4, hyperthreading = no&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Speeds | 4x2299.998&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Models | 4xIntel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Caches | 4x46080 KB&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Memory | 15.6G&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Observations - Load during conversion:&lt;br /&gt;
TokuDB snappy - Load 1.07, IOPs (around) 30mb/s&lt;br /&gt;
RocksDB - Load 1.09, IOPs (around) 50-70Mb/s&lt;br /&gt;
(There seem to be data load round and then a second round of compression afterwards)&lt;br /&gt;
TokuDB LZMA - Load 3-4, IOPs (around) 7mb/s&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/5238347122759704481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2018/04/mysql-compression-olympics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5238347122759704481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5238347122759704481'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2018/04/mysql-compression-olympics.html' title='MySQL Compression Olympics'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-8370249736051166746</id><published>2018-02-20T12:57:00.000+00:00</published><updated>2018-07-09T22:43:40.526+01:00</updated><title type='text'>Competency, Simplicity and Transparency - Pattern</title><content type='html'>&lt;br /&gt;
&lt;h3&gt;
Abstract&lt;/h3&gt;
&lt;div&gt;
&lt;div&gt;
&lt;br /&gt;
A large number of IT organizations today are monodisciplinary. This detracts from their ability to provide well-crafted products and use best-practices that exist from other disciplines. Wheels need to be reinvented and messy workarounds seem to trudge the IT organisation along.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
There is a historical reason that IT organisations have ended up this way; departmental fiefdoms, communication issues and bureaucratic red tape.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The solution to this would be to bring in experts from other disciplines and set a framework that highlights competency, simplicity and transparency to integrate all the expertise and produce high quality products.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Inspired by the philosophy of John Ruskin and the Guild of St. George.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;center&gt;
&lt;iframe allow=&quot;autoplay; encrypted-media&quot; allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/x40l1ov8hfA&quot; width=&quot;560&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;/center&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
1. Introduction&lt;/h3&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;br /&gt;
My name is Jonathan. I have been working for 11 years, trying to improve the performance of systems that use databases. Through that experience (and with observing leading people in my industry), I have developed a knack for viewing everything as a system and then identifying bottlenecks within that system.&lt;br /&gt;
&lt;br /&gt;
As of the middle of last year, I have started to use this knack and apply it to human systems at work. I have also studied intensively some concepts from: psychology, philosophy, political theory, social systems, economics and business strategy.&lt;br /&gt;
&lt;br /&gt;
After noticing some short comings that began to increasingly frustrate me at work and in the spirit of &#39;don&#39;t just complain, try to fix it&#39;, I have come up with a system of organising work in IT organisations that I have given a lot of thought to.&lt;br /&gt;
&lt;br /&gt;
I plan in this post (or white paper) to explain some shortcoming with our current way of working in IT and a possible future or improvement to those systems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
2. In the Beginning&lt;/h3&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSGW8OAqfIXIr3W_rJ1kfUImiMlHxX8enuCOgzpUogI3RUQMNqbVlRZXZOtmb8T2nviT-IBhazAVPsA_hFUmQpBSivVy7hYz7Kn_41k6s5vDNc_4pYgQnD_5AnAX3OIQzE2uRWCdfgznk/s1600/Paper.Project.1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1029&quot; data-original-width=&quot;1280&quot; height=&quot;321&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSGW8OAqfIXIr3W_rJ1kfUImiMlHxX8enuCOgzpUogI3RUQMNqbVlRZXZOtmb8T2nviT-IBhazAVPsA_hFUmQpBSivVy7hYz7Kn_41k6s5vDNc_4pYgQnD_5AnAX3OIQzE2uRWCdfgznk/s400/Paper.Project.1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
IT organisations or the IT department within organisations, typically used to look like the diagram above. You would have Developers, QA, Database Administrators, System Administrators and Network Administrators. Some companies still have this same structure with slightly different divisions.&lt;br /&gt;
&lt;br /&gt;
Over time, problems with this structure emerged. The main one that I would say is that over-time, the objectives of the different teams diverged from that of the overall company to that of the priorities of the team. Meaning, they became fiefdoms or tribes and started warring with each other.&lt;br /&gt;
&lt;br /&gt;
Not physically warring with each other. More like a sort of&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Territorial protectionism: &quot;This falls into our areas and we will decide whether to do it or not&quot;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Resource allocation: &quot;Team X needs us to do Y. It will take a lot of work and I can&#39;t be bothered with it now. I&#39;ll just tell them to write me a ticket and I&#39;ll put it in the backlog for a while&quot;&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Communication process creep: &quot;I know that the ticket was sent 2 months ago, but I have not received the detailed documentation of what to do, nor do I have written authorisation from manager X and head of Y&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9zzJ8ZD0Thd6F5dspe7DvoR1bzVQi0evD2pv7wPaDN0SlwY1Awl6xuwzcwMgwRooTKjJ8jUIX2o0J8EaIZUAYJLcXLsxhNDwW00j6_ZHCwDYEGx-CIfHfKOXUNs-STUxf11tOSzK_o7w/s1600/Paper.Project.2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;986&quot; data-original-width=&quot;1280&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9zzJ8ZD0Thd6F5dspe7DvoR1bzVQi0evD2pv7wPaDN0SlwY1Awl6xuwzcwMgwRooTKjJ8jUIX2o0J8EaIZUAYJLcXLsxhNDwW00j6_ZHCwDYEGx-CIfHfKOXUNs-STUxf11tOSzK_o7w/s400/Paper.Project.2.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
If you look at the above chart as a hierarchy or a social system, it would look like Feudalism.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
2.1 Story: The Consultant&lt;/h4&gt;
&lt;br /&gt;
&lt;br /&gt;
A Java consultant once joined a company for a 6 month contract with a similar Feudalistic structure. He asked the DBA team to give him an Oracle dev database so that he can develop what was asked of him. He wrote up a ticket and waited. After a while of not getting the database, he continued with other things and tried to compensate with what he had available. There was some back and forth between the heads of his department and he did mention the lack of a dev database in meetings.&lt;br /&gt;
However, the contract finished at the end of 6 months and he left the company. 1 month later, he received an email that his Oracle dev database was ready for him to use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
3. Rise of the Developers&lt;/h3&gt;
&lt;hr /&gt;
&lt;br /&gt;
Around the beginning of the first dot-com boom, small start ups became quite popular. In those start-ups, it was expected that developers, set up the entire system - what we call full stack developers, today. As those companies succeeded and grew, some chose not to split off responsibilities to the format of feudalist model, but instead decided to add more multi-skilled developers.&lt;br /&gt;
&lt;br /&gt;
This produced the following and arguably the current model for small to mid-sized companies:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhoNl6b0FBc2OxKOJ9Dlav9QNc4bAWJgyNIlvKtKacL-B2p5XXVLTaeYZX9Q2EzE85PdZUErAMeJKyky0VZBNwsUXiANjp-OUOxrBO5u8lvPHfqNWLM9Mbz4U2uDYQO_PFhVba8-v7Lh0/s1600/Paper.Project.3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1126&quot; data-original-width=&quot;1280&quot; height=&quot;351&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhoNl6b0FBc2OxKOJ9Dlav9QNc4bAWJgyNIlvKtKacL-B2p5XXVLTaeYZX9Q2EzE85PdZUErAMeJKyky0VZBNwsUXiANjp-OUOxrBO5u8lvPHfqNWLM9Mbz4U2uDYQO_PFhVba8-v7Lh0/s400/Paper.Project.3.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Now what you have is what I call a developer-centric IT company and if I were to pick a hierarchical structure for it, I would say Monarchy.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
There are two phenomena that I can see that got us here: job compression and automation.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
3.1 Job Compression&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Job compression means that a company decided to restructure its processes to have fewer stages which reduces the need for wait time between stages.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix8dp2EMvZKyqbL_r3l15XqdT8vhjJG6ZskOqsO2ej8g58IfQahTpnYuY2TDy3F29EbafXXvZCZRHa-XsJ2fHO7Lz1FoIj1HobLkhNJnn841ON4F7dA4V8BNrVea318n5v3g_EbOUq9VY/s1600/Paper.Project.1+%25281%2529.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1010&quot; data-original-width=&quot;1280&quot; height=&quot;315&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEix8dp2EMvZKyqbL_r3l15XqdT8vhjJG6ZskOqsO2ej8g58IfQahTpnYuY2TDy3F29EbafXXvZCZRHa-XsJ2fHO7Lz1FoIj1HobLkhNJnn841ON4F7dA4V8BNrVea318n5v3g_EbOUq9VY/s400/Paper.Project.1+%25281%2529.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The example above shows a mortgage approval process. There are 4 stages. Each stage is a person with different expertise and different authority. Between each stage, there &#39;work request&#39; sits in that person&#39;s inbox until they can get to it. The combined processing time and queuing time is 18 days.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Job compression would give 1 person enough authority and expertise to make a decision on the approval process.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS8qL3He2RanFquvXznMAr82PWYrmW8Df6wXIsw5VHp2QpMW6xnKUi55L64GKnyluLLiMFIwPFm9Q65spxEF13_UaQnf8oUwyqPn_vkq-3QSmIa4b6NchV_2cH9nkiZysOhzCBOQstbtU/s1600/Paper.Project.2+%25281%2529.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;1018&quot; data-original-width=&quot;1135&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS8qL3He2RanFquvXznMAr82PWYrmW8Df6wXIsw5VHp2QpMW6xnKUi55L64GKnyluLLiMFIwPFm9Q65spxEF13_UaQnf8oUwyqPn_vkq-3QSmIa4b6NchV_2cH9nkiZysOhzCBOQstbtU/s320/Paper.Project.2+%25281%2529.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
You have now reduced the time it takes to approve a mortgage from 18 days to 7 days. Note that this was largely accomplished by reducing the overall queue time.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h4&gt;
3.2 Automation&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
As more developers needed to take care of more areas of expertise, they did so by using certain developer philosophies to solve problems and in this case used automation. This brought about certain innovations like Puppet, Chef and Ansible along side previous SysAdmin innovations like virtualisation and later, cloud computing.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
You can now, using code, boot up a container of a web server with the all files, scripts and images and run a slew of black box tests against it to see if it fully works.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Accordingly, developers now take on several roles in the IT organisation:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Development&lt;/li&gt;
&lt;li&gt;Business Analysis&lt;/li&gt;
&lt;li&gt;Quality Assurance&lt;/li&gt;
&lt;li&gt;Database Administration&lt;/li&gt;
&lt;li&gt;System Administration (now DevOps)&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;li&gt;Data Engineering&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
However, it is difficult to hold all that information inside one&#39;s head and developers are using these automations as a crutch to progress with their original work. For example, you can download a few Puppet modules and install as well as begin monitoring a new high availability database. Unfortunately, you have now lost the expertise (in the company) of what is going on under the hood and how to fix issues when they occur.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Very few innovations have been made in the areas outside the realm of pure developing as there are fewer experts in companies to make those innovations.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
For example, while we have automated processes for storing and managing database schema changes, we have not had any innovations with deploying dev/test/staging databases that contain actual data to test against. Nor can we use existing automated systems for managing schema changes when our production databases become too big.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
There is a general &#39;uneasy&#39; feeling when needing to make changes to systems we don&#39;t fully understand. This negates the &#39;safe to fail&#39; environments which we use today to make innovations. We also tend to apply &#39;philosophies&#39; that work in one area and to another. This is sometimes helpful, but other times detrimental.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;b&gt;3.3 Story: API vs Batch Process&lt;/b&gt;&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I was involved in a data batching process that roughly required 200 million items to be processed through an existing API. Had that process gone through the usual way, it would have taken 64 days, with the average chance of crashing.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The idea to improve this process was to add more web servers and parallel the work into as many threads as possible. This is a common philosophy that developers have picked up due to limitations with the speed of cores on CPUs. As core speeds have not improved in 7 years, the only option to improve performance would be to split the work across a number of threads.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I identified that API spent the majority of its time making database calls and that ultimately, the bottleneck would be the hard disk IO and certain mutexes.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I recommended offloading part of the work to the database. This involved loading 200 million items to a temporary table in the database that took 7.5 minutes, using a single thread. The rest of the work still needed to go through the API and took 8 hours to complete. Had the whole process been applied against the database in an efficient manner, I would assume it would take up to 45 mins.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;b&gt;3.4 Story: Spread Out vs Push Down&lt;/b&gt;&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
A company had a batch process that took around 2 hours and had a detrimental effect on the website during that time. I configured the database to handle such loads better and brought the time down to 30 mins using 6 application servers. I rewrote the batch process to be more &#39;database friendly&#39; &amp;nbsp;(push down work to the database) and reduced the time down to 3 minutes and 1 application server.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
4. Competency, Simplicity and Transparency - Pattern&lt;/h3&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
So far, we have had a feudalistic hierarchy with issues with warring fiefdoms and fighting over company resourced. We had then given all the resources to one entity - monarchy, but we lost expertise and reduced innovation in certain areas.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
How can we leverage more advanced governing systems like democracy and capitalism?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
How can we move to an organisational environment where more individualism is valued and where people are able to thrive and do better work?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
4.1 Competency&lt;/h4&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;Skill is the unified force of experience, intellect and passion in their operation.&lt;/i&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;- John Ruskin&lt;/i&gt;&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
One element of Capitalism, is about accepting Pareto’s principle about how expertise is distributed in a population in one type of hierarchy. Instead of going against it (socialism), it is designed to create new hierarchies, more areas of expertise, to have more people at the top of different hierarchies.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
This lends towards the idea of craftsmanship as well.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
What could happen in the future is that IT companies can structure their teams based on competency-based hierarchies. Meaning, areas of specific expertise and philosophies which are exlusive to one particular domain, thus maximising results for the whole IT company.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Another benefit from expertise and craftsmanship can be found in economics. Economies of Scope is a term from the world of business. You have probably heard of Economies of Scale, where you have a few products and you try to have bigger factories and bigger machines to pump out the same product in large quantities which would mean cheaper costs.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
For example, you can have a factory that makes 3 types of sandwiches. You purchase bigger machines and improve your processes as much as possible to make those 3 sandwiches as fast as possible and remove all possible waste.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Economies of Scope, on the other hand, is a system where you try to produce different and varied products at a cheaper price. For example, take Subway. You can go in one and produce a high variety of sandwiches at slightly higher price than if you would buy a prepackaged sandwich in a shop.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;a href=&quot;https://saylordotorg.github.io/text_fundamentals-of-global-strategy/s05-01-ghemawat-s-aaa-global-strategy.html&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;411&quot; data-original-width=&quot;600&quot; height=&quot;273&quot; src=&quot;https://saylordotorg.github.io/text_fundamentals-of-global-strategy/section_05/ecddccf82d4d387c446a34dfacc0b9e1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://saylordotorg.github.io/text_fundamentals-of-global-strategy/s05-01-ghemawat-s-aaa-global-strategy.html&quot; target=&quot;_blank&quot;&gt;&lt;br /&gt;
&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
The idea with Economies of Scope is to break down the process of creating new products into sub-processes that have a very defined scope and then set up communication systems to co-ordinate between those defined processes as well as have some synergy between them.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
4.2 Simplicity&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
A complex system is difficult to work with. It is also difficult to work in a mess. Now complexity doesn&#39;t exactly equal a mess, but both of them are &lt;u&gt;not&lt;/u&gt;&amp;nbsp;an ordered and organised system. So (complexity &lt;u&gt;or&lt;/u&gt;&amp;nbsp;mess) is Chaos and not Order, in this context.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPJOH6KV0oP6m8G5R-7DvwEHmnRYINfQvoPWSfMZDVOi5HCkXCM94x30mwrrYdPEQpw4oOetvKri4K3dRKn43gRC_gxa-fZhRV_x_wr2ohuKuTercg70IVYyZ343RHgvmIXBJF0rtzQM8/s1600/Paper.Project.11.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;828&quot; data-original-width=&quot;1242&quot; height=&quot;213&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPJOH6KV0oP6m8G5R-7DvwEHmnRYINfQvoPWSfMZDVOi5HCkXCM94x30mwrrYdPEQpw4oOetvKri4K3dRKn43gRC_gxa-fZhRV_x_wr2ohuKuTercg70IVYyZ343RHgvmIXBJF0rtzQM8/s320/Paper.Project.11.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
For us to get to order, we need to simplify the system by organising the mess with rules. Too many rules, lead to complexity, so once there, we need to either remove unneeded rules or find patterns or philosophies to the rules and use those to simplify the system.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;Art is not a study of positive reality, it is the seeking for ideal truth.&lt;/i&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;- John Ruskin&lt;/i&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Once your system is simple - not a mess, not complicated and not complex - it has a &#39;clean&#39; and &#39;this just looks right&#39; feeling to it. This might be called the aesthetics of simplicity.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Similar to &#39;clean code&#39; and &#39;clean architecture&#39; this philosophy of aesthetics has an innate feeling in it that something is beautiful and right.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://designful.co/2017/02/27/the-aesthetics-of-simplicity/&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; data-original-height=&quot;600&quot; data-original-width=&quot;800&quot; height=&quot;300&quot; src=&quot;https://designfulco.files.wordpress.com/2017/02/tea_room.jpg&quot; title=&quot;The Tea Room&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;The Tea Room&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
I would like to include diagrams to this aesthetic. Systems diagrams, network diagrams, database diagrams, business logic/rules diagrams - these need to be included in the art of &#39;clean and simple&#39;.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
When those objectives are reached, the systems, network, databases and business logic/rules may also be clean and simple - to understand, use, operate and make changes to. Please give it a try and see if it instinctively makes sense to you.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;br /&gt;
&lt;/h4&gt;
&lt;h4&gt;
4.3 Transparency&lt;/h4&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;To see clearly is poetry, prophecy and religion all in one.&lt;/i&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;- John Ruskin&lt;/i&gt;&lt;/blockquote&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Transparency is ultimately, the best way to prevent fiefdoms from occurring. Fiefdoms usually silo and represent information to other parts of the company to benefit itself.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
For example, lets say an unethical manager would like a talented individual to stay in their division. That manager can simply not promote that individual and even give negative reviews to keep them where they are.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If, however, HR had access to objective metrics about all the employees, they could see that that person produced good work and has been in there position for some years. They would promote that person before they move to another company.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Some metrics that help can be included in Transparency:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Time until first 100 lines of code (&lt;a href=&quot;http://gitprime.com/&quot;&gt;gitprime.com&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Complexity rating of class (PMD)&lt;/li&gt;
&lt;li&gt;95% API response time&lt;/li&gt;
&lt;li&gt;Average time for SEV2 tickets resolution&lt;/li&gt;
&lt;li&gt;Orders per week&lt;/li&gt;
&lt;li&gt;Website feature usage (clicks) per week&lt;/li&gt;
&lt;li&gt;Usefulness of App feature - survey&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
5. New Roles&lt;/h3&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;br /&gt;
This framework has a definition for an old role: Managers and a new role which I felt should be included that I call: Technical/Business Analyst. Both are very important for the framework, so I will explain them now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
5.1 Technical Business Analyst&lt;/h4&gt;
&lt;br /&gt;
Business Analysts seem to be something that only large companies have and there has been some huge innovation in documenting and expressing business knowledge in the last 5 years. We all need to start using this skill set to explain and diagram requirements and business knowledge, no matter the company size.&lt;br /&gt;
&lt;br /&gt;
Business Process Modelling Notation 2.0 and Decision Modelling Notation could well be the next innovation in bridging the dialog between business and IT.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
&lt;b&gt;5.1.1 Story&lt;/b&gt;: Requirements Diagram&amp;nbsp;&lt;/h4&gt;
&lt;br /&gt;
I was trying out using decision tables to document requirements. I talked with the Product Manager and asked her to give it a try. She took a ticket that a developer quoted as taking 5-8 days to implement. She went over the requirements and built a decision table in excel. She then showed it to the original developer, who said: &quot;If this is all that is required, then it should take &lt;b&gt;1-2 days&lt;/b&gt; to implement&quot;.&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt; &lt;br /&gt;
&lt;h4&gt;
&lt;b&gt;5.1.2 Story&lt;/b&gt;: Pyramid of Doom&amp;nbsp;&lt;/h4&gt;
&lt;br /&gt;
&lt;br /&gt;
I was working on a way to document technical processes. I went over some code and found an if-then-else &quot;pyramid of doom&quot; in it. I then tried to put the conditions from the code into a decision table. After I was finished, I showed it to the original developer and he instantly understood it and made a correction to the table. I then proceeded to tell the business analysts in the company that were extremely impressed that that developer understood it so quickly. Apparently, they have had difficulties communicating business requirements to him before.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the old way BPMN 1.0, mapping a process would look something like this:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie9X-F7WTUi5cQ_gNAqfbycejakUiroSOXkPLNSdSZN_yk2YtwsOcqvEEpQ0dj5yhvGUFzMqkEJ9bP92VnROWCHQ9438NVvItihf_2hyuzBC2Po2uJgKGsgEoKv7v1bzHCByx8dZEYobI/s1600/Paper.Project.8.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;949&quot; data-original-width=&quot;1280&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEie9X-F7WTUi5cQ_gNAqfbycejakUiroSOXkPLNSdSZN_yk2YtwsOcqvEEpQ0dj5yhvGUFzMqkEJ9bP92VnROWCHQ9438NVvItihf_2hyuzBC2Po2uJgKGsgEoKv7v1bzHCByx8dZEYobI/s400/Paper.Project.8.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I am sure, everyone has ran into something like this glued to a wall in an office. It&#39;s not very clear what is going on.&lt;br /&gt;
&lt;br /&gt;
What happens in BPMN 2.0 and DMN, is as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1G9gVSEHOFREKsmhs5TmAySK2f0qpL1ooxA7FoqyKxBy5KXRr5Hi7Hh79JQFJOdWtjCnTdiLm4SQlORWifAeWJMupOa5FOClxjpPWraG0Gyp9K8FUHwNS7IK60t55Cfkfa44JTN6SuN0/s1600/Screenshot+2018-02-20+11.26.12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;262&quot; data-original-width=&quot;866&quot; height=&quot;120&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1G9gVSEHOFREKsmhs5TmAySK2f0qpL1ooxA7FoqyKxBy5KXRr5Hi7Hh79JQFJOdWtjCnTdiLm4SQlORWifAeWJMupOa5FOClxjpPWraG0Gyp9K8FUHwNS7IK60t55Cfkfa44JTN6SuN0/s400/Screenshot+2018-02-20+11.26.12.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Decision Table - Discount Decision&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
And then, the process mapping is simplified:&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD8wqct4Cf-mKvQMuyDr3VLiPmLNBksWqMbW5ZwlBr3oljTat4ytjHFPNg7NyhXNsBFlQk_nXM0XQt6dIROUi1qCNjOJITb23nK9Gk419DEI_TGje2rOB90sS198Lgb9qfdY0XSAYwaMI/s1600/Paper.Project.10.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;428&quot; data-original-width=&quot;1280&quot; height=&quot;133&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjD8wqct4Cf-mKvQMuyDr3VLiPmLNBksWqMbW5ZwlBr3oljTat4ytjHFPNg7NyhXNsBFlQk_nXM0XQt6dIROUi1qCNjOJITb23nK9Gk419DEI_TGje2rOB90sS198Lgb9qfdY0XSAYwaMI/s400/Paper.Project.10.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;BPMN 2.0 - Notice the small square/hash icon in the discount decision&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
The magic happens in three different ways:&lt;br /&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;The business logic is captured in an easy to understand way for the business user (notice, its in Excel)&lt;/li&gt;
&lt;li&gt;That same decision table is understood by the developer&lt;/li&gt;
&lt;li&gt;The process mapping is now easy to understand and therefore easier to understand more parts of the system.&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
We&#39;ve gone over the business side, but we can go a bit further and apply this same process mapping to the technical side:&lt;/div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbsoF0ue82Uu1K5ta5CvsRgmcwVP-gySMJsxYFV92bDoNOKQ3YmVo_sHejnDxSBwvxqEUgRZJBiVgBqqOhClks3Kqbpa2AO9QFxTlZPbF8qFiWTWZjnxxx-kq_G-4z8_LRhBPQZXszu4g/s1600/Screenshot+2018-02-20+11.26.24.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;306&quot; data-original-width=&quot;694&quot; height=&quot;176&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbsoF0ue82Uu1K5ta5CvsRgmcwVP-gySMJsxYFV92bDoNOKQ3YmVo_sHejnDxSBwvxqEUgRZJBiVgBqqOhClks3Kqbpa2AO9QFxTlZPbF8qFiWTWZjnxxx-kq_G-4z8_LRhBPQZXszu4g/s400/Screenshot+2018-02-20+11.26.24.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;DMN for a Technical Process&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
So when you go into the &#39;Process Order&#39; task from the diagram above, you would goto a technical process diagram listed below:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3EJT3WQOnoojIArkFYnty5BReAVorZpcF_uTU7dZblKoj3lTzmiU4rsvpyaSg5o4EPCvQqGwPbKdV_0O1RlALsnJRvKkLB8pB_ODuOvGnyAyv3b2p6AH-w1ZaeSEZPHnUmrzjCwtCmQA/s1600/Paper.Project.7.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;577&quot; data-original-width=&quot;1280&quot; height=&quot;180&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3EJT3WQOnoojIArkFYnty5BReAVorZpcF_uTU7dZblKoj3lTzmiU4rsvpyaSg5o4EPCvQqGwPbKdV_0O1RlALsnJRvKkLB8pB_ODuOvGnyAyv3b2p6AH-w1ZaeSEZPHnUmrzjCwtCmQA/s400/Paper.Project.7.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;DMN for a Technical Process&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Technical Business Analyst should be the ones to go over both and create both of these types of diagrams and tables. This should achieve a couple of things:&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;Provide a counter-balance and due diligence to new business requirements: &quot;I understand you would like this new feature. Could you please explain to me in detail what it is that you need?&quot;&lt;/li&gt;
&lt;li&gt;Reduce the time groups of developers spend next to whiteboards.&lt;/li&gt;
&lt;li&gt;Reduce risk by using decision tables to notice scenarios that were not considered: &quot;We have Active for CustomerStatus, but I don&#39;t see a scenario where the OrderStatus is suspended.&quot;&lt;/li&gt;
&lt;li&gt;Reduce the meetings between developers and business users.&lt;/li&gt;
&lt;li&gt;Reduce the scope that developers need to work on and increase focus on a specific task.&lt;/li&gt;
&lt;li&gt;Create a system of business and technical documentation.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
TBAs should spend time going over the backlog of tickets. This should increase the velocity of the team if the tickets are very well defined.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9VkA2m8z_54Q8sGyv732MaSUcHGyhktbK3JSzA54ZZ2F_IVH6d5PheBpNcr118CiJ4_wuvA2AgB2lW_iGJ7_P1H9BNITg73IM0TcWtPwh9yJVOd9TFb_TRT-8dFr3DHfPvMDLJtC1rzc/s1600/Paper.Project.6.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;804&quot; data-original-width=&quot;1280&quot; height=&quot;251&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9VkA2m8z_54Q8sGyv732MaSUcHGyhktbK3JSzA54ZZ2F_IVH6d5PheBpNcr118CiJ4_wuvA2AgB2lW_iGJ7_P1H9BNITg73IM0TcWtPwh9yJVOd9TFb_TRT-8dFr3DHfPvMDLJtC1rzc/s400/Paper.Project.6.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
When a new ticket is taken on by the team, a developer and a &lt;b&gt;QA engineer&lt;/b&gt; should pick up the same ticket: The QA should start writing functionality tests based on the scenarios in the decision table and the developer should write the code and test it against those tests.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This role should cover the following points from &#39;&lt;a href=&quot;https://betterembsw.blogspot.co.uk/2016/08/boehms-top-10-software-defect-reduction.html&quot; target=&quot;_blank&quot;&gt;Boehm&#39;s Top 10 Software Defect Reduction list&lt;/a&gt;&#39;:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;Finding and fixing a software problem after delivery is often 100 times more expensive than finding and fixing it during the requirements and design phase&lt;/li&gt;
&lt;li&gt;Current software projects spend about 40 to 50 percent of their effort on avoidable rework.&lt;/li&gt;
&lt;li&gt;About 80 percent of avoidable rework comes from 20 percent of the defects&lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In addition, this role should also prevent or at least greatly reduce cancelled projects or priority changes. I understand that these are extremely demoralising for developers.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Let us finish up by going over the framework values with this role:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Competency: This is a new role for most small-to-medium companies. It should streamline the development process by adding an expert into the right area and reducing the scope of work for other people in the company.&lt;/li&gt;
&lt;li&gt;Simplification: Having easy to understand diagrams and documentation simplifies development work. TBAs should also identify parts of the system that could be simplified (value stream mapping) and suggest very specific and narrow work for technical debt.&lt;/li&gt;
&lt;li&gt;Transparency: TBAs should make the whole system easy to understand for both IT and business users, outside of it. &amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
5.2 Managers&lt;/h4&gt;
&lt;br /&gt;
I would like to start off with saying that managers do not equal team leaders. In the developer-centric companies, there are very few managers and there are mainly team leaders: developers that have been promoted to lead other developers.&lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://dilbert.com/strip/1993-02-01&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;501&quot; data-original-width=&quot;1600&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_11o0YeJ6iKcjV7hYnqQV51qYmGKpvWXB-ePTuaS_SMyiNZzsPV3dRLyV6YrZ84122SRM83bhdkNTi3HjKGql92ti15QbKnUDx0iI0kUxVRAWg4uRJGCho0T4aBtOElwLSGkHMPFuAxI/s640/Screenshot+2018-02-20+09.37.54.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;font-size: 12.800000190734863px;&quot;&gt;Dilbert.com&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
It is no secret that people do not like managers that have no idea about their technical role. In addition, there was a study that determined that 65% of managers actually produced negative value for the company. On the other side, good managers produce huge value (Pareto Principle) for the company and it should not be something we write-off.&lt;br /&gt;
&lt;br /&gt;
Currently, with the lack of managers in IT companies, there is a reliance on hiring someone who &#39;is the right fit&#39; and are basically outsourcing the need to manage to the individual. If they don&#39;t work well, then there is something wrong with them.&lt;br /&gt;
&lt;br /&gt;
In the context of a Capitalistic/Democracy, what role would managers play?&lt;br /&gt;
Well, in a Democracy, there is a need for&amp;nbsp;&lt;b&gt;Law-makers&lt;/b&gt;&amp;nbsp;to make systems for people to interact in a helpful way to society. There is also a need for&amp;nbsp;&lt;b&gt;Courts&lt;/b&gt;&amp;nbsp;for dispute resolution.&lt;br /&gt;
&lt;br /&gt;
Managers should think of systems inside the company that promote honesty, tolerance and freedom of speech. Managers should also resolve disputes in the company and look for workplace complications before they become a full blown warring tribe. Bear in mind, that this framework encourages experts and experts usually have opinions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Following the values of the framework, lets go over what a manager should do:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Competency&lt;/b&gt;: The manager should be competent enough at coming up with social systems &amp;nbsp;that are effective for that specific company culture. The idea is that the cogs turn smoothly.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Simplification&lt;/b&gt;: The manager should set out rules in those systems, but set out very few rules and then enforce them. With regards to communication, less is more. The manager should make sure that a group can handle things in their own expertise and scope and try to reduce communication dependancies.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Transparency&lt;/b&gt;: The manager should implement metrics gathering to both know how the IT company is performing, but also be transparent to stakeholder outside IT and build trust with them.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
6. Applying the Pattern&lt;/h3&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Let&#39;s take three measures of the output of a system to see how these philosophies could work: Speed, Control and Quality.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
6.1 Speed&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Competency&lt;/b&gt;: If we have experts, then we can make the best choices to build the products instead of trying out many choices until we reach the right one.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Simplification&lt;/b&gt;: If we simplify the system as much as we can, we can both integrate new systems faster as well as produce easy to use systems. In a lot of ways, simplifying equals business agility as it helps you change the business faster to meet the needs of the marketplace.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Transparency&lt;/b&gt;: If we have metrics that show us were bottleneck are in the system, we can make those systems as fast as possible.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
6.2 Control&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Competency&lt;/b&gt;: If we have a high degree competency for a defined scope and area, then we have a high degree of control over the system.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Simplification&lt;/b&gt;: If the system is simplified, it is easy to use it.&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Transparency&lt;/b&gt;: If the movement of work is transparent, we can see monitor the time it takes to exchange communication and complete work in the system. Another way of looking at it is that one cog is moving slower and is slowing the system down. Ultimately, this is where a manager would need to step in.&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
6.3 Quality&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;Competency&lt;/b&gt;:&amp;nbsp;If we have craftsmen, the cogs they produce are of high quality.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Simplification&lt;/b&gt;:&amp;nbsp;If the products we deliver have been simplified, it provides an easy to use product for the customer (perceived quality).&lt;/li&gt;
&lt;li&gt;&lt;b&gt;Transparency&lt;/b&gt;: If we have metrics to see how popular the new product is and how it is used, we can improve the quality of that product. Ultimately, this will need direction from &#39;the business&#39; and would require interaction with Technical Business Analysts (TBAs in the diagram).&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;Quality is never an accident. It is always the result of intelligent effort.&lt;/i&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;i&gt;- John Ruskin&lt;/i&gt;&lt;/blockquote&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;h3&gt;
7. F.A.Qs&lt;/h3&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Is this system a replacement for Agile?&amp;nbsp;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;No, its completely complementary to it and would probably better serve the principle of having &#39;multi disciplinary teams&#39;.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;&amp;nbsp;How do you prioritise or expedite work in this system?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;That would be up to the manager. Technically, if you would like the option of expediting, you would need to leave some spare capacity in the teams.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;What if there is not enough skill in house?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;If you don&#39;t have the skills you need in the company, then consider bringing in an outside consultant - even if its for a few days. You will not gain new innovations, but you will gain from other company&#39;s experience.&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;What would happen there isn&#39;t enough work to justify a new field?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;It could be very possible to let one person in the company have a dual-role and still have time to try and innovate in this new field.&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;How can I split up an area of expertise without it leading to a huge overhead of communication?&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;That would really depend on you and your needs. You need to find a balance of &#39;less is more&#39; with regards to communication, but also have enough work concentrated in front of an expert for them to recognise patterns and generate innovation.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/8370249736051166746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2018/02/cstcogs-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/8370249736051166746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/8370249736051166746'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2018/02/cstcogs-framework.html' title='Competency, Simplicity and Transparency - Pattern'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/x40l1ov8hfA/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-9157679358291313671</id><published>2018-02-05T12:33:00.000+00:00</published><updated>2018-02-19T10:11:40.476+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>My MySQL Linux Tuning Checklist</title><content type='html'>&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Things I look for when optimising or debugging a Linux OS:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;IOschedular (noop or deadline)&lt;/li&gt;
&lt;li&gt;Linux Kernel &amp;gt; 3.18 (multi queuing)&lt;/li&gt;
&lt;li&gt;IRQbalance &amp;gt; 1.0.8&lt;/li&gt;
&lt;li&gt;File System: noatime, nobarrier&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;ext4: data=ordered&lt;/li&gt;
&lt;li&gt;xfs: 64k&lt;/li&gt;
&lt;li&gt;logfiles in different partition (if possible)&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Swapiness (0 or 1, depending)&lt;/li&gt;
&lt;li&gt;Jemalloc (if needed)&lt;/li&gt;
&lt;li&gt;Transparent hugepages - disabled&lt;/li&gt;
&lt;li&gt;Ulimit (open files) &amp;gt;1000&lt;/li&gt;
&lt;li&gt;Security&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;IPtables&lt;/li&gt;
&lt;li&gt;PAM security&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;Raid Controller/Smart HBA&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;write-cache enabled&lt;/li&gt;
&lt;li&gt;battery backed&lt;/li&gt;
&lt;li&gt;For HP servers: &lt;i&gt;hpssacli controller all show (detail|status)&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;Tweak cache-ratio to 50/50 or 75/25 (and test)&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/9157679358291313671/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2018/02/my-mysql-linux-tuning-checklist.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/9157679358291313671'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/9157679358291313671'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2018/02/my-mysql-linux-tuning-checklist.html' title='My MySQL Linux Tuning Checklist'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-7765905608230172762</id><published>2018-01-04T15:05:00.000+00:00</published><updated>2018-01-04T19:42:56.852+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>A DBA Analyses &#39;The Phoenix Project&#39;</title><content type='html'>Last year, I read &#39;The Phoenix Project&#39;. I liked it and as an IT manager in the past, I did experience high blood pressure during the SEV1 scenarios in the book.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://www.amazon.co.uk/Phoenix-Project-DevOps-Helping-Business/dp/0988262509/ref=sr_1_1?ie=UTF8&amp;amp;qid=1515071233&amp;amp;sr=8-1&amp;amp;keywords=the+phoenix+project&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;499&quot; data-original-width=&quot;333&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYvd4TX4UhXmYAFPT2hDReDS1CEO99vVRoOGz31vboddnx8L8Thp2VltYaitYQzFqOMe14PfgXtifGdLO1HJtmiP_1gLjDquUejkGtJ-Z4f6QBvClgV3fCxjE1m0zbQDvi2jfuNz3fjc8/s200/51A028BIc0L._SX331_BO1%252C204%252C203%252C200_.jpg&quot; width=&quot;133&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
I also liked the way DevOps methodology helped solve issues with IT as well as help the company succeed overall.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
As a DBA, however, I did have some things that didn&#39;t make sense to me about this story.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Bare in mind that the two major incidents in the book were database related. So in this post, I would like to jot down some things I have noticed and how they could have been solved looking at them from a different lens.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;hr /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;i&gt;Caution, Spoiler Alert&lt;/i&gt;&lt;/div&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;h3&gt;
&lt;br /&gt;
&lt;/h3&gt;
&lt;h3&gt;
Incident No.1 - Tokenisation&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In the first incident, a 3rd party supplier ran a script against the database to tokenise some personal data. This was related to an issue that information security highlighted, but had the result of effecting HR and accounting.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In the book, there is a complaint that there was no test environment to see if this script would have any negative effects on other parts of the organisation.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Now to me, this does make sense and at the same time, makes no sense at all.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If you meant, that back in the day, it was hard to get full environments setup to test changes on your application servers, then you would probably be right. Today, perhaps based on the methodology that this book introduces, you probably do have those environments setup: either virtualised or in a container.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
Testing Database&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
What doesn&#39;t make sense to me is that is not having a test database. Now reading through the book, there are mentions of Oracle database and some MS SQL databases. As a mainly MySQL DBA, I have not always worked on those databases, but I have worked next to people who have. My observation is, if you were to have an Oracle database, you would almost certainly have other dev/test/UAT/staging/pre-prod database servers as well.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Why do I think this? If you can afford to pay for an Oracle database, you would probably get more testing databases under the same license. License being the most expensive part when using Oracle. &amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
So a testing database to test things that may effect the precious and expensive database server is almost a certainty.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
&lt;br /&gt;
&lt;/h4&gt;
&lt;h4&gt;
DBA as a Gatekeeper&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Now it seems shocking to me that the DBA had not been involved in the process to validate this 3rd party script. Old school Oracle DBAs are involved in everything that happens on their servers.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Need a user on the database? goto the DBA.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Need a database server for a new app? please fill these in triplicates, detailing what would be the projected usage for the next 5 years.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In most companies, an Oracle DBAs may even setup integration between other products like Oracle HR and finance.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
So how could you have run something that significant against the database without their knowledge is beyond me.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Assuming that a database field had in fact been messed up, then Oracle DBAs have a TON of really enviable backup and restore features.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
They can query a table to view all the backups that are available to restore from and choose the point-in-time that is closest to what they need. A DBA could simply restore the database, fetch the specific table that had its column changed and apply it to the to production database.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Its more than one table? Restore the database, go over the changes in the logs a point-in-time and skip the parts the conversion script applied.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
It seems to me that the authors wrote the book based on their own experiences, but those experiences occurred in companies that had no DBAs. Not having a DBA is a product of start ups, not old school 1500-person car-parts manufacturers.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Incident No.2 - Conversion&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
There was a crippling database issue to do with a database conversion that was needed along side some new code roll out. The issue caused a 2 day - &lt;i&gt;break out the hand held receipt machine&lt;/i&gt; - downtime to the system.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyxDExvipOpVNxmC4AI3ptEcv9G8IDu_XYXmkNjNvVA7QEBumL6I9KXaCg3aL10-hrELWdheeLD6unu6OlAUw8QALiil-BE26A7KGNnwvB6VDRmbmoKc-4e_50jzidJ-FqA7mVdNJILjE/s1600/Talento.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;300&quot; data-original-width=&quot;300&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyxDExvipOpVNxmC4AI3ptEcv9G8IDu_XYXmkNjNvVA7QEBumL6I9KXaCg3aL10-hrELWdheeLD6unu6OlAUw8QALiil-BE26A7KGNnwvB6VDRmbmoKc-4e_50jzidJ-FqA7mVdNJILjE/s200/Talento.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
Works on My Laptop&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
During the initial investigation, a developer said something along the lines of &#39;it worked fine on my laptop&#39; when describing the performance of the database conversion scripts. The problem was that on production, it was x1000 slower. Now, I have written about &lt;a href=&quot;http://www.jonathanlevin.co.uk/2017/11/how-to-not-be-one-that-deploys-that.html&quot; target=&quot;_blank&quot;&gt;how to not be the one that deploys that slow query to production&lt;/a&gt; before and this really states that situation. Apparently, they still didn&#39;t have a database testing environment to test it against.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
However, on the topic above of &#39;&lt;b&gt;DBA as a gatekeeper&lt;/b&gt;&#39;:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Why didn&#39;t the DBA review the conversion scripts or was involved in the the code review process for SQL statements?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
It could be that there wasn&#39;t any in the company.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Another point was that they couldn&#39;t cancel the conversion after they started and noticed how slow it was. If this was within a transaction or a single alter table statement, why not?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
If too many things have changed, could they not restore the database to a point-in-time before the changes were made?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
Was the conversion x1000 slow instead of maybe x10 slow, because of a foreign key check that could have been turned off?&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
A DBA would have given you those options.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;
Project Unicorn&lt;/h3&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
After the hero turns things around and things begin to pickup, they decide to start a separate project to add predictive features to the main project. In it, they decided to bypass seeking permission for database changes and create a new database where they copied production data into it from several locations. I very much like this approach and it falls in line with the &lt;a href=&quot;https://dzone.com/articles/carving-the-java-ee-monolith-into-microservices&quot; target=&quot;_blank&quot;&gt;reactive micro services pattern&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This would make this book ahead of its time. Instead of managing one main database (although, they did mention in the book that had a couple of dozen database servers) for the website, they can break it up into several database servers, based on functionality. What is required is to use tools - and I would believe in 2012, they meant &lt;a href=&quot;http://www.jonathanlevin.co.uk/2008/03/open-source-etl-tools-vs-commerical-etl.html&quot; target=&quot;_blank&quot;&gt;ETL tools&lt;/a&gt; - to migrate the needed data into these new database servers.&amp;nbsp;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
This would still need a DBA though or at the very least, a data engineer with an ops background, as you now need to:&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Data model new environments based on data from old ones&lt;/li&gt;
&lt;li&gt;Create and maintain data pipelines&lt;/li&gt;
&lt;li&gt;Monitor for errors and fix data that didn&#39;t make it&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Fix data drift and re-sync data across servers&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
In addition, you now need to backup, monitor the availability and performance of these additional database servers.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
So while it adds complexity to the backend and you are now moving from simple database maintenance to a more data architecture role, it is the way forward. Certainly the only way to have proper micro services with their own single-purpose and loosely coupled data stores.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;
&lt;div dir=&quot;ltr&quot; lang=&quot;en&quot;&gt;
it might have been better if they just hired a DBA to solve thier DB issues.&lt;/div&gt;
— GuybrushThreepwoodⓋ (@jonathan_ukc) &lt;a href=&quot;https://twitter.com/jonathan_ukc/status/817360954472235008?ref_src=twsrc%5Etfw&quot;&gt;January 6, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; charset=&quot;utf-8&quot; src=&quot;https://platform.twitter.com/widgets.js&quot;&gt;&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;twitter-tweet&quot; data-lang=&quot;en&quot;&gt;
&lt;div dir=&quot;ltr&quot; lang=&quot;und&quot;&gt;
;)&lt;/div&gt;
— Kevin Behr (@kevinbehr) &lt;a href=&quot;https://twitter.com/kevinbehr/status/818197364615876613?ref_src=twsrc%5Etfw&quot;&gt;January 8, 2017&lt;/a&gt;&lt;/blockquote&gt;
&lt;script async=&quot;&quot; charset=&quot;utf-8&quot; src=&quot;https://platform.twitter.com/widgets.js&quot;&gt;&lt;/script&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/7765905608230172762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2018/01/a-dba-analyses-phoenix-project.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/7765905608230172762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/7765905608230172762'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2018/01/a-dba-analyses-phoenix-project.html' title='A DBA Analyses &#39;The Phoenix Project&#39;'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYvd4TX4UhXmYAFPT2hDReDS1CEO99vVRoOGz31vboddnx8L8Thp2VltYaitYQzFqOMe14PfgXtifGdLO1HJtmiP_1gLjDquUejkGtJ-Z4f6QBvClgV3fCxjE1m0zbQDvi2jfuNz3fjc8/s72-c/51A028BIc0L._SX331_BO1%252C204%252C203%252C200_.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-2505047176845116791</id><published>2018-01-03T10:00:00.000+00:00</published><updated>2018-01-04T19:01:57.555+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Industry"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>Top 4 Reasons Companies Won&#39;t Fix Their Database Issues</title><content type='html'>When I consult at a company, I aim to identify issues with their database and give options on how to solve them.&lt;br /&gt;
However, sometimes implementing those solutions may be a more lengthy process than it needs to be and sometimes they may not be implemented at all. During my career, I have observed some reasons as to why that might happen within organizations.&lt;br /&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;i&gt;Obviously, the following observations will never happen at your company. I am just writing about them so that you might notice them in other places.&lt;/i&gt;&lt;br /&gt;
&lt;hr /&gt;
&lt;br /&gt;
&lt;h4&gt;
1. Legacy code&amp;nbsp;&lt;/h4&gt;
&lt;br /&gt;
People don&#39;t like to have anything to do with legacy code. It’s painful. It’s difficult. It’s risky to change. It runs business critical functions. Worse of all, they didn’t write it. This can be a problem as often, the most cripling database issues require changes to legacy code.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
2. New Technologies or Methods&lt;/h4&gt;
&lt;br /&gt;
People don’t like you to introduce any new technologies they don’t want to learn and maintain. Not even different methods in technologies already being used. No fancy upgrades to the DB server, no new load balancers and certainly don’t start using SQL statements in the code over their existing ORM.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
3. Old Technologies or Methods&lt;/h4&gt;
&lt;br /&gt;
In a complete polar opposite, people in tech organisations don’t like you to introduce boring technologies. What would be the point of introducing boring (yet tested) technologies when they could be playing around with shiny new ones. There is a caveat to this - groups prefer it when other groups they depend on (let’s say developers depend on ops) choose to use boring and tested technologies. Just not for themselves. And vice versa.&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
4. Management Involvement&lt;/h4&gt;
&lt;br /&gt;
Last, but certainly not least, no one from upper management will get involved in resolving these issues and push forward solutions. No project/product manager/agile-coach will be assigned to chase up issues. As far as they are concerned, this is an engineering issue and as engineers, you need to sort it out yourselves. Only &#39;change requests&#39; from the business, have managers around it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h4&gt;
Final Thoughts&lt;/h4&gt;
&lt;br /&gt;
After some years of analysing database systems for performance issues, I am finally realising that I should also analyse human systems for performance issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/2505047176845116791/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2018/01/top-4-reasons-companies-wont-fix-their.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/2505047176845116791'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/2505047176845116791'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2018/01/top-4-reasons-companies-wont-fix-their.html' title='Top 4 Reasons Companies Won&#39;t Fix Their Database Issues'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-12055675304420439</id><published>2017-12-27T11:32:00.001+00:00</published><updated>2017-12-27T11:35:35.892+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DevOps"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>Setting Up Databases in your Development Environment</title><content type='html'>Setting up databases in development environments can be challenging.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Normally, what I usually see is some automated process for setting up empty databases with up-to-date data structures. This is helpful for integration testing, but is tricky for actual development as well as performance testing.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;For example:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;It is difficult to conceptually get your head around writing a query when you cannot see any data in your tables&lt;/li&gt;
&lt;li&gt;You cannot possibly know if your query is slow before you deploying it to production without running it against &#39;some&#39; data.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;i&gt;Relevant Post:&lt;/i&gt; &lt;a href=&quot;http://www.jonathanlevin.co.uk/2017/11/how-to-not-be-one-that-deploys-that.html&quot; target=&quot;_blank&quot;&gt;How to Not be the One that Deploys that Slow Query to Production&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;In addition, there can be a strict requirement to not let sensitive customer data be available outside certain secure environments and certainly not available to development environments.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h4&gt;Step 1&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;What you would need to do is go over your database and separate the elements into different criteria:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Data Structure&lt;/li&gt;
&lt;li&gt;User Management&lt;/li&gt;
&lt;li&gt;Referential Tables&lt;/li&gt;
&lt;li&gt;Primary Tables&lt;/li&gt;
&lt;li&gt;Child Tables&lt;/li&gt;
&lt;li&gt;Mapping Tables&lt;/li&gt;
&lt;li&gt;Sensitive Data&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;(explanation below)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Data structure management and user management should be, by now, a solved problem. You have systems like Liquibase and Flyway that manage this for you. Essentially, you can use these systems to automatically generate containers which your developers can then use or setup empty local databases on developer machines using SQL scripts.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;For user management, MySQL has PAM plugin to manage users via LDAP, but you can manage this through scripts as well.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Referential tables (tables that contain data such as id = 1, status = &#39;DONE&#39;) should also be small enough to be included in this stage as well. You need to identify which tables contain this very basic data and add it to the data structure repository or SQL file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h4&gt;Step 2&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;This is where things get a little bit tricky: You need to identify which tables are your Primary &#39;feed data&#39; tables or Object tables. You then need to identify which tables are the Child tables of those Primary tables. Lastly, you need to identify which tables Map keys across different tables - either Primary to Child (as in multi-to-multi relationships) or Primary to Primary.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Once you have identified these tables, you can discern how much data you would like to keep in your development databases. My recommendation would be to go in these three directions:&lt;/div&gt;&lt;div&gt;&lt;ol&gt;&lt;li&gt;Specify a &lt;b&gt;set number&lt;/b&gt; of keys in the Primary tables and then get the data from the Child and Mapping tables based on those keys.&lt;/li&gt;
&lt;li&gt;Specify a &lt;b&gt;specific set&lt;/b&gt; of keys from the Primary tables and then get the data from the Child and Mapping tables based on those keys.&lt;/li&gt;
&lt;li&gt;Keep data by a date range for the primary table and then use its keys to populate the Child and Mapping tables.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div&gt;Make sure that the amount of data is adequate for your needs: not too small and not too large.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h4&gt;Step 3&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;This separation of table types can now help us with identifying sensitive data. Data structure and also Referential tables, should not have in them sensitive data. Neither should Mapping tables. What would have sensitive data are Primary and Child tables.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Identify the columns where sensitive data maybe kept in those tables and either:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Empty that data&lt;/li&gt;
&lt;li&gt;Give it a default value (all emails will be test@email.com)&lt;/li&gt;
&lt;li&gt;Obfuscate those values in some way&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;You can change this the data by either outputting it with those changes into an SQL file or dumping that data into a staging database, changing the sensitive data and then dumping it into an SQL file with a tool.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Ideally, this stage needs to go through a QA process/person before the company releases sensitive data to generally available containers or repositories which keep history of changes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h4&gt;Conclusion&lt;/h4&gt;&lt;div&gt;&lt;br /&gt;
With taking the time to separate the different elements in a database, you can make it less complicated and you would then be more able to automate parts of the database into your CI/CD process.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/12055675304420439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2017/12/setting-up-databases-in-your.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/12055675304420439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/12055675304420439'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2017/12/setting-up-databases-in-your.html' title='Setting Up Databases in your Development Environment'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-5858187755136598934</id><published>2017-12-08T10:18:00.000+00:00</published><updated>2017-12-12T21:03:48.845+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>Data Modelling: Counter Table</title><content type='html'>A counter table is a table that keeps counts of particular items or for certain keys. This can range from page count on your blog to keep track of a limit the user is allowed to have from a particular item or service.&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXxWJPOVnGgHw8adQ-RkmPQWttetIAKsRckgYQBMmrRk-7_zf-umRtutzjR9hQPBvOm5jJkNKbP0Ma81nL1XPP-cSB4W3Y95YpC9c9pKGepkWe2H3wLxIwqD9zW-UkvLetqBY0mFDwDlo/s1600/41ON0Rfi12L.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;407&quot; data-original-width=&quot;500&quot; height=&quot;260&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXxWJPOVnGgHw8adQ-RkmPQWttetIAKsRckgYQBMmrRk-7_zf-umRtutzjR9hQPBvOm5jJkNKbP0Ma81nL1XPP-cSB4W3Y95YpC9c9pKGepkWe2H3wLxIwqD9zW-UkvLetqBY0mFDwDlo/s320/41ON0Rfi12L.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Usually, a counter table would be better kept in something like Memcached or Redis as frequent increment updates would be better suited to those in-memory systems.&lt;br /&gt;
&lt;br /&gt;
MySQL and Innodb in particular has many stringent systems to make sure that your data has been reliably written to disk. Just going through those systems alone, can make having a counter table, not suitable, not even considering the speed it takes to update the actual table.&lt;br /&gt;
&lt;br /&gt;
However, sometimes there is a need for certain assurances from failure scenarios where in-memory systems may not be suitable for - as when they crash, the data kept in memory is cleared out.&lt;br /&gt;
&lt;br /&gt;
In those cases, may I recommend that you do what I consider a &#39;aggregate counter table&#39;. The idea here is to replace doing lots of increment updates and simply count the original base table you are interested in having counts for.&lt;br /&gt;
&lt;br /&gt;
In short, instead of:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;INSERT INTO base_table;
UPDATE counter_table set value=value+1 where key=key1;
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
You would do&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;INSERT INTO base_table;
On interval (like 1 to 5 seconds):
- INSERT INTO counter_table&amp;nbsp;
- SELECT key1, count(1), max(primarykey) FROM base_table&amp;nbsp;
- WHERE last_count_position
- GROUP BY key1
- ON DUPLICATE KEY UPDATE value=value+recent_count
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to be able to aggregate the base_table more correctly, you need to keep some sort of record of what was the last time or position you read for the base table. What I recommend you consider, is either the primary key, assuming its an integer as well as having a last_updated timestamp column.&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
Below is an example of a counter table that keeps the last id of the primary key it counted from the base table:&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;CREATE TABLE counter_table (
&amp;nbsp; key_id int(10) unsigned NOT NULL,
&amp;nbsp; counts int(10) unsigned DEFAULT &#39;0&#39;,
&amp;nbsp; lastprimary_id int(10) unsigned DEFAULT &#39;0&#39;,
&amp;nbsp; PRIMARY KEY (key_id),
&amp;nbsp; KEY idx_camp (lastprimary_id)
) ENGINE=InnoDB;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to run your &#39;refresh&#39; query, you would first need to query the counter_table like this:&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;SELECT max(lastprimary_id) from counter_table;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
Then populate the counter table by including in your above INSERT INTO SELECT statement a:&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;WHERE base_table.primarykey &amp;gt; lastprimary_id&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
This should be very fast and will prevent the many &#39;database-attacking update queries&#39; that can become a serious bottleneck to your performance in the long run.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Downsides&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
This method doesn&#39;t factor in if the rows in the base table were UPDATE&#39;d or DELETE&#39;d. It just counts the row number. If this is a requirement, you can revert to using UPDATE statements for:&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;UPDATE counter_table SET value=value-1&lt;/code&gt;&lt;/pre&gt;
with the understanding that this will happen infrequently.&lt;br /&gt;
&lt;br /&gt;
You also, now need to maintain a procedure and monitor that it is running on the set intervals that you need it. Fortunately, MySQL has scheduled Events to help with that.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/5858187755136598934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2017/12/data-modelling-counter-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5858187755136598934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5858187755136598934'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2017/12/data-modelling-counter-table.html' title='Data Modelling: Counter Table'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXxWJPOVnGgHw8adQ-RkmPQWttetIAKsRckgYQBMmrRk-7_zf-umRtutzjR9hQPBvOm5jJkNKbP0Ma81nL1XPP-cSB4W3Y95YpC9c9pKGepkWe2H3wLxIwqD9zW-UkvLetqBY0mFDwDlo/s72-c/41ON0Rfi12L.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-2734728890459919571</id><published>2017-11-30T22:15:00.003+00:00</published><updated>2017-11-30T22:20:33.627+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>Archiving for a Leaner Database</title><content type='html'>There is an idea that data is sacred and needs to be stored forever. However, if you keep your data forever, you will, sooner or later, have a very large database.&lt;br /&gt;
&lt;br /&gt;
In order to keep operations running smoothly, it would be useful to allocated data that is used more frequently in certain tables and keep data that is used less frequently in archive tables.&lt;br /&gt;
&lt;br /&gt;
&lt;hr&gt;&lt;br /&gt;
&lt;h3&gt;Some examples&lt;/h3&gt;&lt;br /&gt;
You have a large table that stores transactions and it&#39;s size is 200Gb. It is that way, because your company has been around for 5 years, but in the last year, your company has been successful acquiring new users and your data has doubled.&lt;br /&gt;
&lt;br /&gt;
Congratulations.&lt;br /&gt;
&lt;br /&gt;
In your database, you now have a table that has 5 years worth of data, but your application usually only needs about the last 1-3 months. There may be a use case where someone might require data about a customer for a period starting a year ago and there may also be a reporting request to aggregate data for the last 3 years. Therefore, to play it safe, we need everything in one table.&lt;br /&gt;
&lt;br /&gt;
However, this greatly effects performance. It would be more helpful to try and separate those 3 concerns into 3 different tables:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;A table for a 3 month period for frequently used data&lt;/li&gt;
&lt;li&gt;An archive table that keeps all old and infrequently used data&lt;/li&gt;
&lt;li&gt;A summary table for reporting&lt;/li&gt;
&lt;/ol&gt;With these, we are complying with the principle of Single-Responsibility and greatly improve performance for each purpose.&lt;br /&gt;
&lt;br /&gt;
Having a &#39;main&#39; table with only the last 3 months worth of data, greatly allows you to scale. &lt;br /&gt;
For example, even if your data doubles every year for the next 3-5 years, you still only have to manage a subset of that data. So if those 3 months once took a table 20Gb to store, the year following would be 40Gb and the year after would be 80Gb: These sizes are still very manageable by todays standards. &lt;br /&gt;
In addition, hardware and software improves over time, so there can be a legitimate expectation that simply by upgrading and updating, you can keep humming along.&lt;br /&gt;
&lt;br /&gt;
Taking the effort to identify &#39;hot&#39; and &#39;cold&#39; data and allocating it to the right tables, can mean that your scalability concerns will be addressed for the long term.&lt;br /&gt;
&lt;br /&gt;
&lt;hr&gt;&lt;br /&gt;
&lt;h2&gt;How to implement Archiving?&lt;/h2&gt;&lt;br /&gt;
&lt;hr&gt;&lt;br /&gt;
&lt;h3&gt;Table _archive&lt;/h3&gt;&lt;br /&gt;
One way to implement archiving, is by having a table that ends with _archive.&lt;br /&gt;
&lt;br /&gt;
To enable this, you will need to be able to redirect your queries (from your code mainly, or by a proxy that can do that) to the main or the archive table, based on a particular criteria.&lt;br /&gt;
&lt;br /&gt;
For example, if the date is less than today&#39;s date minus 30 days, then send it to the archive table, if not, then the main table. &lt;br /&gt;
&lt;br /&gt;
Another example may be, if the status column equals &#39;inactive&#39; send to the archive table.&lt;br /&gt;
&lt;br /&gt;
You would largely need to dig through your code for that table and &lt;b&gt;wrap it with an IF statement&lt;/b&gt; to send to the right.&lt;br /&gt;
&lt;br /&gt;
You would also need a data process that &lt;b&gt;migrates data&lt;/b&gt; from the main table over to the archive table when it gets old or becomes cold.&lt;br /&gt;
&lt;br /&gt;
&lt;hr&gt;&lt;br /&gt;
&lt;h3&gt;Partitioning by Date&lt;/h3&gt;&lt;br /&gt;
While this is not a different physical data model, this does help split the table into a few tables and achieving the desired purpose &lt;b&gt;without application code changes&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Is it very common to partition your table to specify which data may be old and allocate it in the right partition, based on date.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;mysql&amp;gt; CREATE TABLE `largetable` (
-&amp;gt;   `id` bigint unsigned NOT NULL AUTO_INCREMENT,
-&amp;gt;   `dateCreated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
-&amp;gt;   `status` int default 1,
-&amp;gt;   `sometext` text,
-&amp;gt;   PRIMARY KEY (`id`,`dateCreated`)
-&amp;gt; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.03 sec)

mysql&amp;gt; alter table largetable partition by RANGE(YEAR(dateCreated)) (
-&amp;gt; PARTITION p2016 VALUES LESS THAN (2017), 
-&amp;gt; PARTITION p2017 VALUES LESS THAN (2018), 
-&amp;gt; PARTITION p2018 VALUES LESS THAN (2019), 
-&amp;gt; PARTITION p2019 VALUES LESS THAN (2020), 
-&amp;gt; PARTITION p2020 VALUES LESS THAN (2021), 
-&amp;gt; PARTITION pmax VALUES LESS THAN MAXVALUE);
Query OK, 0 rows affected (0.05 sec)
Records: 0  Duplicates: 0  Warnings: 0
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
The above example, allocates data by which year the row was created. Please note, after 2020, this sort of manual partitioning will require manually adding new years to this table. If you do it in advance, this can be done without disrupting operations.&lt;br /&gt;
&lt;br /&gt;
&lt;hr&gt;&lt;br /&gt;
&lt;h3&gt;Partitioning by Status&lt;/h3&gt;&lt;br /&gt;
You can also have a partition (as mentioned above) to a status column to active/inactive and simply by using UPDATE to change the value MySQL will move over that row to the right partition. REPLACE or INSERT + DELETE will work as well.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;
mysql&amp;gt; CREATE TABLE `largetable` (
-&amp;gt;   `id` bigint unsigned NOT NULL AUTO_INCREMENT,
-&amp;gt;   `dateCreated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
-&amp;gt;   `status` int default 1, -- default active
-&amp;gt;   `sometext` text,
-&amp;gt;   PRIMARY KEY (`id`,`status`)
-&amp;gt; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.02 sec)

mysql&amp;gt; alter table largetable partition by list(status) (
-&amp;gt; partition pactive values in (1), -- active 
-&amp;gt; partition pinactive values in (2) -- inactive
-&amp;gt; ); 
Query OK, 0 rows affected (0.03 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql&amp;gt; select * from largetable partition (pactive);
Empty set (0.00 sec)

mysql&amp;gt; select * from largetable partition (pinactive);
Empty set (0.00 sec)

mysql&amp;gt; insert into largetable(sometext) values (&#39;hello&#39;);
Query OK, 1 row affected (0.01 sec)

mysql&amp;gt; select * from largetable partition (pinactive);
Empty set (0.00 sec)

mysql&amp;gt; select * from largetable partition (pactive);
+----+---------------------+--------+----------+
| id | dateCreated         | status | sometext |
+----+---------------------+--------+----------+
|  1 | 2017-10-30 10:04:03 |      1 | hello    |
+----+---------------------+--------+----------+
1 row in set (0.00 sec)

mysql&amp;gt; update largetable set status = 2 where id =1 ;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql&amp;gt; select * from largetable partition (pactive);
Empty set (0.00 sec)

mysql&amp;gt; select * from largetable partition (pinactive);
+----+---------------------+--------+----------+
| id | dateCreated         | status | sometext |
+----+---------------------+--------+----------+
|  1 | 2017-10-30 10:04:03 |      2 | hello    |
+----+---------------------+--------+----------+
1 row in set (0.00 sec)
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;hr&gt;&lt;br /&gt;
&lt;h3&gt;Partitioning by ID&lt;/h3&gt;&lt;br /&gt;
And lastly, you can partition on the sequence of your auto incrementing id key.&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;
mysql&amp;gt; CREATE TABLE `largetable` (
-&amp;gt;   `id` bigint unsigned NOT NULL AUTO_INCREMENT,
-&amp;gt;   `dateCreated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
-&amp;gt;   `status` int default 1,
-&amp;gt;   `sometext` text,
-&amp;gt;   PRIMARY KEY (`id`)
-&amp;gt; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Query OK, 0 rows affected (0.02 sec)

mysql&amp;gt; alter table largetable partition by RANGE(id) (
-&amp;gt; PARTITION p1 VALUES LESS THAN (500000000), 
-&amp;gt; PARTITION p2 VALUES LESS THAN (1000000000), 
-&amp;gt; PARTITION p3 VALUES LESS THAN (1500000000), 
-&amp;gt; PARTITION p4 VALUES LESS THAN (2000000000), 
-&amp;gt; PARTITION p5 VALUES LESS THAN (2500000000), 
-&amp;gt; PARTITION pmax VALUES LESS THAN MAXVALUE);
Query OK, 0 rows affected (0.06 sec)
Records: 0  Duplicates: 0  Warnings: 0
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
The above example specifies which partition the row should goto based on the range of what the id number is. This example is more useful if your system does a lot of primary key look ups. It also helps with distributing the table sizes more equally when compared to dates, as you can have more data in recent years.&lt;br /&gt;
&lt;br /&gt;
&lt;hr&gt;&lt;br /&gt;
&lt;h3&gt;A word of caution&lt;/h3&gt;&lt;br /&gt;
Partitioning on the right key is absolutely crucial and not easy. You need to analyse the queries that the application sends to that specific table and come up with a partitioning key(s) that works well and does not slow down the table - at least not the top 80% of the slowest queries.&lt;br /&gt;
&lt;br /&gt;
The partitioning key would need to go into the PRIMARY KEY and in order for the optimiser to send you to the right partition, that key would ideally be included in the WHERE clause of all SELECT/UPDATE/DELETE queries. Otherwise, your query would run sequentially through each partition in that table.&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/2734728890459919571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2017/11/archiving-for-leaner-database_30.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/2734728890459919571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/2734728890459919571'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2017/11/archiving-for-leaner-database_30.html' title='Archiving for a Leaner Database'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-5333903299722910550</id><published>2017-11-25T15:58:00.001+00:00</published><updated>2017-11-30T22:21:47.182+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>How to Not be the One that Deploys that Slow Query to Production</title><content type='html'>Have you ever deployed code to production that slowed the database and the entire site down?&lt;br /&gt;
Did you get a feeling of&lt;b&gt; anxiety&lt;/b&gt; when you just read that?&lt;br /&gt;
&lt;br /&gt;
Well, it could be to do with your &lt;b&gt;test&lt;/b&gt; environment.&lt;br /&gt;
&lt;br /&gt;
Most places nowadays have test suites that will check for &lt;b&gt;integration&lt;/b&gt; issues. But in very few will check for&amp;nbsp;&lt;b&gt;performance&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
The issue lies with how developers are set up to develop code. They have their code on their local computer with a local copy of an empty database where they develop against. That setup will not give you any useful &lt;b&gt;feedback&lt;/b&gt; about how your code will performs once its run against the production database.&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;How do you get Performance Feedback for your Queries?&lt;/h3&gt;&lt;br /&gt;
Whenever you log into your database, lets say MySQL, you get 3 types of feedback:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj09mUKts6F4zl6kVMyKJP-gB8FQB0i_2hxBBYut_TvLzg-wOfctR2k796YmXfdyXmxOOHEetTDKo6bjmdDTV9cztcVnc3h-lB49YYD-kpP_LeHStrtFFhnX1H9fC-YpuFED4KeuDc1UaE/s1600/Screenshot+2017-11-25+15.52.48.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;258&quot; data-original-width=&quot;934&quot; height=&quot;110&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj09mUKts6F4zl6kVMyKJP-gB8FQB0i_2hxBBYut_TvLzg-wOfctR2k796YmXfdyXmxOOHEetTDKo6bjmdDTV9cztcVnc3h-lB49YYD-kpP_LeHStrtFFhnX1H9fC-YpuFED4KeuDc1UaE/s400/Screenshot+2017-11-25+15.52.48.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ol&gt;&lt;li&gt;Your result set&lt;/li&gt;
&lt;li&gt;The number of rows&lt;/li&gt;
&lt;li&gt;The &lt;b&gt;time&lt;/b&gt; it took the query to run&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;
(Postgres, by the way, has \timing.)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;In order to get the right time for your query, you need to run it in on a database that is &lt;b&gt;similar&lt;/b&gt; in hardware, parameters and more importantly, database size as your production database.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Here is an example: if you take a SELECT query that you wrote that has 3 JOINs and you run it on a read-only slave DB server. You choose some decent sample variables from the existing data and you get a result of 0.3 seconds. Now, barring exceptions such as deadlocking, conflicts or server wide slowdown, there is a very high chance that that query will take 0.3 seconds when its run against the production database.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Once you have an environment to test against, you can run EXPLAIN on your query and make improvements till you are happy with it.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3&gt;But what do I do if I use an ORM?&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;Well, if you can output the query that the ORM will use and run that against a database, you will know how long it takes. Hopefully, you will be able to make improvements to your query through the ORM.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;
Make sure that in your company, you have a database to test against that is similar to production. If that is not available, see if you can get access to a read-only DB (sometimes there is one for back up purposes) and at least test your SELECT queries against it.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div&gt;You can then relatively confidently, deploy it to live. At the very least, with a lot less stress.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/5333903299722910550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2017/11/how-to-not-be-one-that-deploys-that.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5333903299722910550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5333903299722910550'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2017/11/how-to-not-be-one-that-deploys-that.html' title='How to Not be the One that Deploys that Slow Query to Production'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj09mUKts6F4zl6kVMyKJP-gB8FQB0i_2hxBBYut_TvLzg-wOfctR2k796YmXfdyXmxOOHEetTDKo6bjmdDTV9cztcVnc3h-lB49YYD-kpP_LeHStrtFFhnX1H9fC-YpuFED4KeuDc1UaE/s72-c/Screenshot+2017-11-25+15.52.48.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-6270876724784974932</id><published>2017-11-14T14:40:00.002+00:00</published><updated>2017-12-27T23:59:13.444+00:00</updated><title type='text'>Top 5 Ways to Overcome Database Skill Shortages </title><content type='html'>In every organisation and in particular new ones, there seems to be a lack of experience and knowledge around databases. &lt;br /&gt;
&lt;br /&gt;
Our experience shows that there is a huge shortage in skills around managing databases, database performance engineering, developing scalable backend database interactions and designing physical data modelling for performance.&lt;br /&gt;
&lt;br /&gt;
Organisations will typically spend huge amounts of money and time to circumvent these shortages until they become simply too expensive to ignore. &lt;br /&gt;
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;a href=&quot;https://stackoverflow.blog/2017/03/09/developer-hiring-trends-2017/&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;701&quot; data-original-width=&quot;800&quot; height=&quot;560&quot; src=&quot;https://zgab33vy595fw5zq-zippykid.netdna-ssl.com/wp-content/uploads/2017/03/HighDemand.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://stackoverflow.blog/2017/03/09/developer-hiring-trends-2017/&quot; target=&quot;_blank&quot;&gt;StackOverFlow Developer Hiring Trends 2017&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
Do your users complain that your system is slow and your developers seem to deploy software releases less and less frequently? &lt;br /&gt;
&lt;br /&gt;
These symptoms could be a result of your company databases becoming more difficult to manage and more cumbersome to work with, making the  company spin its wheels while competitors gain ground.&lt;br /&gt;
&lt;br /&gt;
Here are some suggestions to help you overcome lack of skills in this area:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;b&gt;Adopt database management best practice&lt;/b&gt;. Industry best practices are not easy to come by. The “not invented here” approach can lead to ignoring best practices entirely. But databases have been around for  decades,  so it’s likely, that industry best practices exist that can solve most problems, offering your business the best and quickest route from where you are now to where you need to get to.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Instil a “look under the hood” culture&lt;/b&gt;. Nowadays, so much is hidden away from us. In most cases, we prefer this as we have too many other day-to-day problems to solve. However, learning how databases work under the hood can provide the skills to troubleshoot when things go wrong.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Find the ‘Top 3’ reasons that are holding your system back&lt;/b&gt;. People need to keep in mind that nowadays they almost always work with complex systems. Such systems rarely have just one root cause for any problem. It would be better to focus on the top 3 root causes that may cause severe performance issues and which cannot be explained when looking for a single root cause.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Database performance monitoring that makes sense&lt;/b&gt;.  Monitoring that doesn’t give you the information you need to help maintain the system, is basically noise. You need a combination of metrics and logs to identify bottlenecks and determine changes that will result in faster database performance in order  to get an understanding of how the system is managing under load when your application uses it.&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;If you can’t find the answer, seek help&lt;/b&gt;. There are experts available to help you with your specific database issues. It would be better to consult with one, rather than look to other products which may be more expensive down the line to move to and maintain. Installing a different product, learning how to use it, discovering it’s quirks and how much work is involved to move to it, will be more expensive and time consuming than bringing in an expert, who can advise on the original problem at a relatively small fixed cost.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/6270876724784974932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2017/11/top-5-ways-to-overcome-skill-shortages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6270876724784974932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6270876724784974932'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2017/11/top-5-ways-to-overcome-skill-shortages.html' title='Top 5 Ways to Overcome Database Skill Shortages '/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-859836826444001068</id><published>2017-10-17T11:53:00.000+01:00</published><updated>2017-11-30T22:22:11.318+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>Top Slowest Queries and their Associated Tables in MySQL </title><content type='html'>The following query gets data from performance_schema in MySQL and attempts to regex the digest to the list of tables in the same schema.&lt;br /&gt;
&lt;pre style=&quot;background: #f0f0f0; border: 1px dashed #cccccc; color: black; font-family: &amp;quot;arial&amp;quot;; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; SELECT d.*,  
  (SELECT group_concat(distinct TABLE_NAME) FROM information_schema.TABLES   
 WHERE table_schema = d.schema_name and d.digest_text regexp table_name) table_name  
  FROM performance_schema.events_statements_summary_by_digest d  
 WHERE d.DIGEST_TEXT regexp &quot;^(SELECT|UPDATE|DELETE|REPLACE|INSERT|CREATE)&quot;  
 and d.LAST_SEEN &amp;gt;= curdate() - interval 7 day  
 ORDER BY d.SUM_TIMER_WAIT DESC limit 10\G  
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/859836826444001068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2017/10/top-slowest-queries-and-their.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/859836826444001068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/859836826444001068'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2017/10/top-slowest-queries-and-their.html' title='Top Slowest Queries and their Associated Tables in MySQL '/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-2979047010091846084</id><published>2017-10-16T16:16:00.002+01:00</published><updated>2017-12-01T20:14:46.056+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>Top 3 Reasons Why SQL is Faster than Java</title><content type='html'>I had a discussion with a colleague the other day. He was trying to write some SQL to use for a less-than-optimal data structure and was getting frustrated that it was looking &quot;cumbersome&quot;. He wanted some advice, but was keen to simply write it with a mix of a few light SQL statements and some Java.&lt;br /&gt;
&lt;br /&gt;
I would like to explain why this option would be slower than using &quot;ugly looking&quot; and &quot;cumbersome&quot; SQL:&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;1) Disk I/O&lt;/h2&gt;&lt;br /&gt;
If you were to use Java, you would need to probably get a larger dataset from the database, process it in some way and output the results. This would mean that the database would need to fetch that larger dataset for you which would mean more (sometimes much more IO)&lt;br /&gt;
&lt;br /&gt;
If you were to use SQL, you are leaving the fetching operation to the database&#39;s optimiser and with the help of indexes - may not fetch as much as with Java.&lt;br /&gt;
&lt;br /&gt;
In short, you are allowing the database to reach the right data and filter what not to fetch - for you.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;2) Network&lt;/h2&gt;&lt;br /&gt;
For the reason above, the large dataset normally has to travel over a network. This is unless the java app server is located on the same machine as the database. This is not very common nowadays.&lt;br /&gt;
&lt;br /&gt;
That network overheard can become more pronounced in a virtual or containerised environment where network issues can be a headache. (*note: I am not an expert, just observing from a distance)&lt;br /&gt;
&lt;br /&gt;
In addition, needing to pass data through a network can be an additional overhead in parallel systems where the data needs to travel to each machine before starting an operation.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;3) Java&#39;s Garbage Collection&lt;/h2&gt;&lt;br /&gt;
It may not be known to most people, but Java adds quite the memory overhead for objects and some data structures. You can sometimes get a x100 difference. This does not mean that that you need x100 available memory, but it would mean that the GC would work extra hard with more CPU cycles to clean up the extra memory churn.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Bonus: SQL takes far less code than it would do in Java&lt;/h2&gt;&lt;br /&gt;
While SQL can be an ugly string in your code sometimes, doing it in Java can take between x30-x100 more lines of code including tests. You may also need to test that your code does what SQL already does well such as JOINs and aggregate functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;Caveat: When it is a good idea to use Java over SQL?&lt;/h2&gt;&lt;br /&gt;
For processing a lot of data, Databases have the following concept:&lt;br /&gt;
Row vs Chunk vs Too Big&lt;br /&gt;
&lt;br /&gt;
&#39;Row&#39; would be the slowest way of getting and processing data - unless you need to guarantee some level of data quality which requires it.&lt;br /&gt;
&#39;Chunk&#39; or a set of rows, is just right. Usually this would mean querying a large table by using 2 or 3 keys and get a result set that the database can handle well.&lt;br /&gt;
&#39;Too Big&#39; is a case where the database cannot handle well the number of rows and you would need to split your SQL into &#39;Chunks&#39; using Java and process it that way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please also check out this book that I found useful in this matter:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://www.amazon.com/Relational-Database-Programming-Set-Oriented-Approach/dp/148422079X&quot; target=&quot;_blank&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;499&quot; data-original-width=&quot;330&quot; height=&quot;320&quot; src=&quot;https://images-na.ssl-images-amazon.com/images/I/41tyypBxiwL._SX328_BO1,204,203,200_.jpg&quot; width=&quot;211&quot; /&gt;&lt;/a&gt;&lt;span id=&quot;goog_75982149&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_75982150&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://www.blogger.com/&quot;&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/2979047010091846084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2017/10/top-3-reasons-why-sql-is-faster-than.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/2979047010091846084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/2979047010091846084'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2017/10/top-3-reasons-why-sql-is-faster-than.html' title='Top 3 Reasons Why SQL is Faster than Java'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-5408315135783366564</id><published>2017-10-06T09:21:00.000+01:00</published><updated>2017-12-01T20:14:19.888+00:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PRIMARY"/><title type='text'>What is a Good Data Model</title><content type='html'>&lt;span style=&quot;font-family: &amp;quot;helvetica neue&amp;quot; , &amp;quot;arial&amp;quot; , &amp;quot;helvetica&amp;quot; , sans-serif;&quot;&gt;This is an excerpt from &lt;a href=&quot;https://jonathanvx.gitbooks.io/simple-and-fast-data-models/content/what-is-a-good-data-model.html&quot; target=&quot;_blank&quot;&gt;something I am working on&lt;/a&gt;&amp;nbsp;about physical data modelling.&lt;/span&gt;&lt;br /&gt;
&lt;h3 id=&quot;a-well-data-modelled-table-should&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; break-after: avoid-page; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.5em; letter-spacing: 0.20000000298023224px; margin-bottom: 0.85em; margin-top: 1.275em; orphans: 3; widows: 3;&quot;&gt;A good data modelled table should&lt;/h3&gt;&lt;ol style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.20000000298023224px; margin: 0px 0px 0.85em; padding: 0px 0px 0px 2em;&quot;&gt;&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;Be able to&amp;nbsp;&lt;span style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit; font-weight: 700;&quot;&gt;retrieve&lt;/span&gt;&amp;nbsp;data quickly&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;Be able to&amp;nbsp;&lt;span style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit; font-weight: 700;&quot;&gt;store&lt;/span&gt;&amp;nbsp;data quickly&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;Be&amp;nbsp;&lt;span style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit; font-weight: 700;&quot;&gt;clear and easy&lt;/span&gt;&amp;nbsp;to work with&lt;/li&gt;
&lt;/ol&gt;&lt;h3 id=&quot;a-well-data-modelled-table-should-not&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; break-after: avoid-page; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.5em; letter-spacing: 0.20000000298023224px; margin-bottom: 0.85em; margin-top: 1.275em; orphans: 3; widows: 3;&quot;&gt;A good data modelled table should not&lt;/h3&gt;&lt;ol style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.20000000298023224px; margin: 0px 0px 0.85em; padding: 0px 0px 0px 2em;&quot;&gt;&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;Store unneeded data&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;Need to change its rows very often **&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;Need too many JOINs to get you the data that you need&lt;/li&gt;
&lt;/ol&gt;&lt;h3 id=&quot;purposes-of-a-data-model&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; break-after: avoid-page; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 1.5em; letter-spacing: 0.20000000298023224px; margin-bottom: 0.85em; margin-top: 1.275em; orphans: 3; widows: 3;&quot;&gt;Purposes of a Data Model&lt;/h3&gt;&lt;div class=&quot;comments-section&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.20000000298023224px; margin-bottom: 0.85em; orphans: 3; position: relative; widows: 3;&quot;&gt;A good data model should serve a specific and narrow set of purposes.&lt;/div&gt;&lt;div class=&quot;comments-section&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.20000000298023224px; margin-bottom: 0.85em; orphans: 3; position: relative; widows: 3;&quot;&gt;The more purposes the table serves the:&lt;/div&gt;&lt;ol style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.20000000298023224px; margin: 0px 0px 0.85em; padding: 0px 0px 0px 2em;&quot;&gt;&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;More indexes it would need.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;More cumbersome it will be to store and keep in memory.&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;More overhead it would be to write to.&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;More likely it be a single-point-of-failure&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;More likely it would have locks and deadlocks&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;More likely it would be to add unneeded data&lt;/li&gt;
&lt;li style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit;&quot;&gt;More difficult it would be to make changes to your application if you needed to make changes to the table.&lt;/li&gt;
&lt;/ol&gt;&lt;div class=&quot;comments-section&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.20000000298023224px; margin-bottom: 0.85em; orphans: 3; position: relative; widows: 3;&quot;&gt;If you notice a pattern here, you may notice that&amp;nbsp;&lt;span style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit; font-weight: 700;&quot;&gt;reusability&lt;/span&gt;&amp;nbsp;to a high degree, may hinder the performance of a database. There needs to be a balance between reusability and&amp;nbsp;&lt;span style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit; font-weight: 700;&quot;&gt;single-responsibility&amp;nbsp;&lt;/span&gt;of the data models to be effective.&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;comments-section&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; color: #333333; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.20000000298023224px; margin-bottom: 0.85em; orphans: 3; position: relative; widows: 3;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;blockquote style=&quot;-webkit-font-smoothing: antialiased; border-left-color: rgb(229, 229, 229); border-left-style: solid; border-left-width: 4px; box-sizing: border-box; break-inside: avoid; color: #858585; font-family: &amp;quot;Helvetica Neue&amp;quot;, Helvetica, Arial, sans-serif; font-size: 16px; letter-spacing: 0.20000000298023224px; margin: 0px; padding: 0px 15px;&quot;&gt;&lt;div class=&quot;comments-section&quot; style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit; margin-bottom: 0.85em; orphans: 3; position: relative; widows: 3;&quot;&gt;**&amp;nbsp;&lt;span style=&quot;-webkit-font-smoothing: antialiased; box-sizing: border-box; font-size: inherit; font-style: italic;&quot;&gt;A table that has data that needs to change often and is transient, may be better suited in a cache. If it needs to be saved and transactional, then a smaller table that records the state of certain keys or values with a combination of a log to store how it got that way if it is needed.&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/5408315135783366564/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2017/10/what-is-good-data-model.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5408315135783366564'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5408315135783366564'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2017/10/what-is-good-data-model.html' title='What is a Good Data Model'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-5506908569046429684</id><published>2016-12-30T12:52:00.000+00:00</published><updated>2016-12-30T15:17:15.774+00:00</updated><title type='text'>MariaDB&#39;s Columnar Store</title><content type='html'>I have been keeping an eye on MariaDB&#39;s Columnar store progress for a bit longer then half a year.&lt;br /&gt;
&lt;br /&gt;
MariaDB chose to take the infinidb code after Calpoint closed shop about two years ago and implemented it into their product. I was a bit wary about infinidb as well as it was a columnar store without compression that had &lt;a href=&quot;https://news.ycombinator.com/item?id=8352948&quot;&gt;mixed reviews on news hacker&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
However, it seems like MariaDB have pulled it off. They have added the infinidb engine to MariaDB with all its quirks and extra commands and they have added &lt;b&gt;snappy compression&lt;/b&gt; as well. This is truely a huge win for them and their users, specifically in the area of reporting and analytics.&lt;br /&gt;
&lt;br /&gt;
Here are two real life examples for getting data ready for reporting currently happening in the wild:&lt;br /&gt;
1) MySQL -&amp;gt; Sqoop -&amp;gt; Hadoop - where you would need a) 5-6 additional servers, b) someone to set those servers up in a hadoop cluster and then c) monitor the daily data transfer.&lt;br /&gt;
2) MySQL -&amp;gt; CDC -&amp;gt; Kafka -&amp;gt; Hadoop - a) more technologies to master, b) a few more servers and some c) more monitoring. But this time, its streaming.&lt;br /&gt;
&lt;br /&gt;
To set all of this up could take from a couple of months to a year.&lt;br /&gt;
&lt;br /&gt;
Now with MariaDB, you have:&lt;br /&gt;
1) MariaDB + some SQL scripts - &amp;nbsp;such as&amp;nbsp;&lt;i style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #666666; font-family: inherit;&quot;&gt;INSERT INTO datawarehouse.facttable SELECT ... FROM site.table1 WHERE date &amp;gt;= curdate() - interval 1 day;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
2) MariaDB -&amp;gt; Pentaho/Talend -&amp;gt; MariaDB - Could be a bit slower, but with a GUI and really a lot of monitoring out of the box.&lt;br /&gt;
&lt;br /&gt;
As you can see, there are a lot fewer technologies, a lot fewer complexities and it is a lot more straight forward to develop.&lt;br /&gt;
&lt;br /&gt;
It is also very important to add that no one other than MariaDB is doing this. The closest you have is Tokudb which is great and can also last you a while, but a Columnar store is definitely more suited for this type of task.&lt;br /&gt;
&lt;br /&gt;
So once again, congratulations to MariaDB for offering such a huge benefit to its users.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/5506908569046429684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2016/12/mariadbs-columnar-store.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5506908569046429684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5506908569046429684'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2016/12/mariadbs-columnar-store.html' title='MariaDB&#39;s Columnar Store'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-7483361601599938569</id><published>2016-12-22T12:53:00.000+00:00</published><updated>2016-12-22T12:53:19.952+00:00</updated><title type='text'>Using a Generated Column to help with date lookups</title><content type='html'>I have a table that has two columns: year and month.&lt;br /&gt;
While its ok to search on exact dates or by year, it is harder to search between two dates.&lt;br /&gt;
&lt;br /&gt;
Lets see if we can solve this issue by using a generated column.&lt;br /&gt;
(Table taken from&amp;nbsp;&lt;a href=&quot;https://github.com/jonathanvx/uk_land_registry_paid_dataset&quot;&gt;https://github.com/jonathanvx/uk_land_registry_paid_dataset&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/jonathanvx/56dfbadaf0a51f4eddfe8b3eecfbbbec.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/7483361601599938569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2016/12/using-generated-column-to-help-with.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/7483361601599938569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/7483361601599938569'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2016/12/using-generated-column-to-help-with.html' title='Using a Generated Column to help with date lookups'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-6745985571681791644</id><published>2016-12-21T15:50:00.000+00:00</published><updated>2016-12-21T15:50:20.570+00:00</updated><title type='text'>JSON and MySQL Stored Procedures</title><content type='html'>You probably heard that MySQL 5.7 supports JSON.&lt;br /&gt;
But did you know that you can also use JSON with MySQL Stored Procedures - making them very flexible?&lt;br /&gt;
&lt;br /&gt;
Less talk, more code:&lt;br /&gt;
(Data was used from the &lt;a href=&quot;https://github.com/jonathanvx/uk_land_registry_paid_dataset&quot; target=&quot;_blank&quot;&gt;UK Land Registry&lt;/a&gt; that I worked on)&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/jonathanvx/513066eea8cb5919b648b2453db47890.js&quot;&gt;&lt;/script&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/6745985571681791644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2016/12/json-and-mysql-stored-procedures.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6745985571681791644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/6745985571681791644'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2016/12/json-and-mysql-stored-procedures.html' title='JSON and MySQL Stored Procedures'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-375697951860081841.post-5295771107137914389</id><published>2016-06-15T21:47:00.000+01:00</published><updated>2016-06-15T21:47:11.080+01:00</updated><title type='text'>Seismic Shock in the Analytics World</title><content type='html'>Yandex have released a free columnar store analytical database called &lt;a href=&quot;https://clickhouse.yandex/&quot; target=&quot;_blank&quot;&gt;clickhouse&lt;/a&gt;.&lt;br /&gt;
It seems to be using MySQL from what I can tell (correct me if I am wrong), but its obviously their storage engine and they added some math and aggregation functions.&lt;br /&gt;
&lt;br /&gt;
If it is anything like Infobright then you can expect x50 compression, so for most of us mere mortals that means you can keep everything on one database.&lt;br /&gt;
&lt;br /&gt;
It has (really interesting)&amp;nbsp;&lt;a href=&quot;https://clickhouse.yandex/reference_en.html#Data%20replication&quot; target=&quot;_blank&quot;&gt;replication&lt;/a&gt; with zookeeper.&lt;br /&gt;
&lt;br /&gt;
It has &lt;a href=&quot;https://clickhouse.yandex/reference_en.html#AggregatingMergeTree&quot; target=&quot;_blank&quot;&gt;materialised views&lt;/a&gt; which is absolutely huge.&lt;br /&gt;
&lt;br /&gt;
The benchmarks are &lt;a href=&quot;https://clickhouse.yandex/benchmark.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
It is a lot faster than hadoop/hive. Not sure about the Cloudera/Impala or Spark, but this would potentially be a lot simpler to administrator and is free, of course.&lt;br /&gt;
&lt;br /&gt;
It also comes with tons of &lt;a href=&quot;https://clickhouse.yandex/reference_en.html#Aggregate%20functions&quot; target=&quot;_blank&quot;&gt;aggregation functions&lt;/a&gt;, geospatial functions, math functions... a treat for any data scientist.&lt;br /&gt;
&lt;br /&gt;
Watch this space.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.jonathanlevin.co.uk/feeds/5295771107137914389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.jonathanlevin.co.uk/2016/06/seismic-shock-in-analytics-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5295771107137914389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/375697951860081841/posts/default/5295771107137914389'/><link rel='alternate' type='text/html' href='http://www.jonathanlevin.co.uk/2016/06/seismic-shock-in-analytics-world.html' title='Seismic Shock in the Analytics World'/><author><name>Jonathan Levin</name><uri>http://www.blogger.com/profile/17336586681878234499</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>