dbc.ampusage

Analytics
rvp
Fan

dbc.ampusage

What is the unit for CPU time in dbc.AMPUSAGE?
Is it seconds ?

thanks,
rvp
2 REPLIES
Enthusiast

Re: dbc.ampusage

If you view the "view" using Teradata Administrator, you can list the columns.

Which are
AccountName
UserName
CpuTime
DiskIO
CpuTimeNorm
Vproc
VprocType
Model

The field has a description of
"The AMPUsage.CPUTime field gives the number of seconds of AMP CPU time used by the user and account."

What use the data is I am not sure. Its based on dbc Acctg (Accounting)

I assume that you should create a historical version of this table (Acctg), and periodically (Once per day or oce every 5 minutes) move the data from the AmpUsage to the history select/insert then delete the original version, you can then use the information to se summerised usage over time.

Without proper management of the Acctg table the data in teh AmpUsage view will be pretty meaningless as the data acumulates from the time it was created?

I reserve the right to be wrong on this! Someone with more experience of Teradata may know better.
Senior Apprentice

Re: dbc.ampusage

Depending on "account string expansion" (ASE) you might have more than a single row per user, e.g. one row per day or hour or request.
Before there was the QueryLog this was the only way to get more details about cpu and io used by a query.

Of course QueryLog provides much more details, but AMPusage is usually still used, because:
- queries might not be logged in QueryLog
- the last step in an aborted query is not included in QueryLog

In most shops there's ASE based on hour and a history table is maintained in a nightly batch, thus it's the easiest way to get info about system usage broken down to account strings or day or hour of day.

Dieter