I want to capture total row processed count of the last ran query in Vertica VSQL shell.

I know this can be done programmatically, but that is not the question here.

For the answer, any system table pointers will also help, or Vertica maintained variable.

For e.g. in Teradata database system I know of variable activity_count which keeps count of records processed in last executed query.

1

There are 1 best solutions below

3
mauro On BEST ANSWER

Check PROCESSED_ROW_COUNT from V_MONITOR.QUERY_PROFILES. For example (rows returned by the last 5 queries):

SELECT 
    LEFT(query, 30), 
    processed_row_count 
FROM 
    v_monitor.query_profiles 
ORDER BY 
    query_start DESC 
LIMIT 5;

Also check the Fine Manual