How I slashed a SQL query runtime from 380 hours to 12 with two Unix commands I was trying to run a simple join query on MariaDB (MySQL) and its performance was horrendous. Here’s how I cut down the query’s run time from over 380 hours to under 12 hours by executing part of it with two simple Unix commands. Below is the query, with forms part of a more complex GHTorrent analysis I implemented usin