Grab stats for partitions

Useful scripts to grab stats for partitions: set serveroutput on DECLARE LV_SQL VARCHAR2(1000); CURSOR C1 IS SELECT TABLE_NAME T , PARTITION_NAME P , LAST_ANALYZED L  FROM USER_TAB_PARTITIONS WHERE LAST_ANALYZED is null AND TABLE_NAME = ‘&TABLE_NAME’ and partition_name like (‘&PART_NAME’); BEGIN   FOR I IN C1 LOOP    dbms_output.put_line(‘Gathering stats for :’||I.P);    LV_SQL:= ‘BEGIN  ‘;…