Skip to Content

How to fetch table statistics in BODS

The simplest way of fetching table statistics would be reading the stats from repository Metadata table.

This information could be used while building the framework for a Job in DS and could be helpful in performance optimization. The following SQL query selects some of the attribute values related to loading of a target table in a given datastore. You may add more attributes values depending on your requirement.

Select your repository database and execute the following SQL statement. Before executing just update the below query with a valid datastore name and table name for which you want to check the stats.

SELECT
TABLE_NAME, TABLE_OWNER,DATASTORE, TABLE_ATTR,TABLE_ATTR_VALUE
FROM ALVW_TABLEATTR
WHERE DATASTORE= ‘datastore_name’
AND TABLE_NAME = ‘table_name’
AND TABLE_ATTR IN (
‘Date_last_loaded’,
‘Total_Number_Of_Rows_Processed’,
‘Number_Of_Rows_Rejected’,
‘Number_Of_Inserts’,
‘Number_Of_Updates’,
‘Number_Of_Deletes’,
‘Elapsed_Time_For_Load’,
‘Loader_Is_Template_Table’);

Be the first to leave a comment
You must be Logged on to comment or reply to a post.