I’m sure that many of you use the magic query from Shlomi.
This query retrieves the difference between two status values with a single query.
I’m really fan of this kind of query and about this query in particular. This query is very useful to retrieve an information without to have to store a middle result.
Now, I tried this query on a MariaDB 5.5 server and I had a surprise :
The result was a bit strange, with negative or null values.
I’ve just had these server for few hours in my hands and I had no
more time to analyze the situation.
I assume that the subquery optimisations in MariaDB can be involve here but it’s just an assumption.
Does anyone encountered the …[Read more]