In this blog, we’ll look at how queries in systems with parallel processing can return rows in a non-deterministic order (and how to fix it).
Short story:
Do not rely on the order of your rows if your query does not use
ORDER BY
. Even with
ORDER BY
, rows with the same values can be sorted differently. To fix this issue, always add
ORDER BY ... ID
when you have
LIMIT N
.
Long story:
While playing with MariaDB ColumnStore and Yandex ClickHouse, I came across a very simple case. In MariaDB ColumnStore and …
[Read more]