Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 16 Oct 2008 @ 18:00:41 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Getting a session's own resource info
 
From:   DWellman

Hi,

CPU and IO is available for a session, the difficult bit in your requirements are to get it "within the session".

Working through the possible options:

1) DBC.AmpUsage: you can use Account String Expansion (ASE) to generate 1 row per amp per session. However, the AmpUsage rows are not written until the query has finished. If you don't mind missing out the resource figures for the query that retrieves the resources figures then this is probably the easiest mechanism. What you do need to do though is to set up ASE for the relevant usernames.

2) PM/API or PM&PC - whatever you want to call it: this information is updated every 'n' seconds but may be too old for your needs. On a lot of sites 'n' is 300-600 seconds (i.e. 5 to 10 minutes). That can be changed dynamically by a program issuing the commands. Unless you are on TD 12 this data is NOT available from SQL. You have to write a cliv2 program.

3) DBQL: the data is available, but after a time delay which is controlled by one of the DBSControl settings. I can't remember which one off the top of my head, read the manual for this.


Finding the correct queries is easy as your code would already know the session number, use that as part of the search criteria when reading the DBQL table for the data. The issue here may be that if you're reading the DBQL table in database DBC then your query is going to be a full table scan. This 'may take some time' (as the saying goes !).

What are you actually trying to achieve ?

Regards,

Dave

Ward Analytics Ltd: Information in motion ( www.ward-analytics.com )



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023