The tables in PERFORMANCE_SCHEMA
(P_S
)
are not actually tables. You should not think of them as tables,
even if your SQL works on them. You should not JOIN them, and you
should not GROUP or ORDER BY them.
Unlocked memory buffers without indexes
The stuff in P_S
has been created with “keep the
impact on production small” in mind. That is, from a users point
of view, you can think of them as unlocked memory buffers – the
values in there change as you look at them, and there are
precisely zero stability guarantees.
There are also no indexes.
Unstable comparisons
When sorting a table for a GROUP BY or ORDER BY, it may be necessary to compare the value of one row to other rows multiple times in order to determine where the row goes. The value compared to other rows can change while this happens, and will change more often the more load the server has. The end …
[Read more]