Environment
Vertica Analytics Platform 11.0.2
Situation
It is necessary to identify tables in Vertica databases that contain integer columns with the AUTOINCREMENT property. The goal is to determine how close these columns are to reaching their maximum value, as this may prevent the tables from accepting new data. Please provide a script to identify the same.
Resolution
The below query can be used to identify the columns which are close the maximum value. The maximum value can only be increased if it is less than 2^63, regardless of the integer data type
select identity_table_name,sequence_name,minimum,maximum,current_value, (current_value/maximum)*100 from sequence
Find complete article on support portal