Amp CPU time and query optimization

Database

Amp CPU time and query optimization

I have been tasked with optimizing a few complex queries and would like to gauge my over all effectivness of doing so.  AMPCPUTIME seems to be the most logical measure of this but can this measurement be affected simply due to the current state of the database?

IE: If I run a query when the system is healthy will that give me a lower AMPCPUTIME then when the system is in a critical state?

On the same note, when working through these queries I was told that I was showing up on the TASM report due to high CPU consumption.  What generally places a query on this report and can it also be affected by the current database state?

Thank you all for the help!

3 REPLIES
N/A

Re: Amp CPU time and query optimization

Cputime is not affected by the load on the system as the cpu used to process a query is the same regardless of the runtime.

Your queries are reported because they are on the TOP N list of all queries during the reporting period sorted by descending cpu usage  :-)

Dieter

Re: Amp CPU time and query optimization

Ok, thank you!

Teradata Employee

Re: Amp CPU time and query optimization

Hi Dnoeth,

Can you please explain why in the calculation of PJI and UII we multiply the AmpCpuTime by 1000?

Thanks'

Sandesh R Gitte