In this previous Blog I described an example on how to build a Custom Object in MONyog. But there is one problem you may encounter and that is, that when querying Information_Schema and Performance_Schema, it can sometimes be difficult or impossible to be sure to have a unique column (or a unique set of columns) in the result set as neither of those generally guarantee uniqueness with a(ny) subset of columns. And a unique column (or a unique set of columns) is required for a MONyog Custom SQL Object.
A common way to add a unique row-identifer to a result set is like this (note the use of ”assignment operator” (“:=”) as different from “comparison operator” (“=”) ):
SET @t = 0;
SELECT @t:=@t+1 AS uniq, id FROM thetable ORDER BY
uniq;
.. but using this is …
[Read more]