Adaptive Server version 15.0.2 increases the number of metrics shared among user IDs. The change reduces the number of entries in sysquerymetrics (a view of sysqueryplans), and automatically aggregates the metrics for identical queries across different user IDs.
The user ID (uid) of sysquerymetrics is 0 when all table names in a query that are not qualified by user name are owned by the DBO.
For example, if table t1 is owned only by the DBO and shared by different users:
select * from t1 where c1 = 1
Adaptive Server uses 0 as the uid for the sysquerymetrics entry for all users executing this query who do not have a private table named t1.
In this example, if table t2 is owned and qualified by “user1,” Adaptive Server also uses an UID of 0:
selet * from user1.t2 where c1 = 1
However, if table t3 is owned only by “user1,” but is unqualified and not owned by the DBO, the UID of “user1” is used in the sysquerymetrics entry:
select * from t3 where c1 = 1