verticavsql

Is there any "Row Processed Count" variable for the last executed query in Vertica database, either in system variables or system tables?


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.


Solution

  • 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