Openedge (Progress) - List queries with more reads
Use the SQL below to list the queries with more reads in your database.
SELECT distinct top 5
c."_Connect-IPAddress" as 'IP',
c."_Connect-Type" as 'Connection type',
c."_Connect-Name" as 'User',
c."_Connect-Pid" as 'PID',
f."_File-Name" as 'Table',
u."_UserTableStat-Read" as 'Read',
u."_UserTableStat-Create" as 'Write',
u."_UserTableStat-Update" as 'Update',
u."_UserTableStat-Delete" as 'Delete',
database() as 'Database'
FROM PUB."_UserTableStat" u, PUB."_File" f, PUB."_Connect" c
where (u."_UserTableStat-Read" > 0
or u."_UserTableStat-Create" > 0
or u."_UserTableStat-Update" > 0
or u."_UserTableStat-Delete" > 0)
and f."_File-Number" = u."_UserTableStat-Num"
and c."_Connect-Id" = u."_UserTableStat-Conn" + 1
order by u."_UserTableStat-Read" desc
c."_Connect-Type" as 'Connection type',
c."_Connect-Name" as 'User',
c."_Connect-Pid" as 'PID',
f."_File-Name" as 'Table',
u."_UserTableStat-Read" as 'Read',
u."_UserTableStat-Create" as 'Write',
u."_UserTableStat-Update" as 'Update',
u."_UserTableStat-Delete" as 'Delete',
database() as 'Database'
FROM PUB."_UserTableStat" u, PUB."_File" f, PUB."_Connect" c
where (u."_UserTableStat-Read" > 0
or u."_UserTableStat-Create" > 0
or u."_UserTableStat-Update" > 0
or u."_UserTableStat-Delete" > 0)
and f."_File-Number" = u."_UserTableStat-Num"
and c."_Connect-Id" = u."_UserTableStat-Conn" + 1
order by u."_UserTableStat-Read" desc
Comments
Post a Comment