|
|
Archives of the TeradataForum
Message Posted: Thu, 28 Jul 2005 @ 14:12:02 GMT
Subj: | | Re: High CPU and low I/O |
|
From: | | Diehl, Robert |
To find the specific culprit, turn on query logging for the id. You can then run a query to find the culprit. Something like the query below
will work (remove aggregation if you want be individual query.
select lg.querytext,
count(*) as requests,
sum(lg.totalcputime)
from dbc.QryLog lg
join DBC.userdb usr
on lg.UserId = usr.Id
where cast(lg.startTime as date) = date
and Name = 'username'
group by 1
order by 3 desc
Thanks,
Bob Diehl
| |