Answers for "gather stats on a table in oracle"

SQL
4

how to check last gather stats on table in oracle

SELECT ST.TABLE_NAME, ST.PARTITION_NAME, HIGH_VALUE, ST.NUM_ROWS, 
	   ST.BLOCKS, ST.LAST_ANALYZED
FROM DBA_TAB_STATISTICS ST
LEFT JOIN DBA_TAB_PARTITIONS PAR
ON PAR.TABLE_NAME = ST.TABLE_NAME AND PAR.PARTITION_NAME = ST.PARTITION_NAME
WHERE ST.OWNER = 'MY_OWNER'
  AND ST.TABLE_NAME = 'MY_TABLE'
ORDER BY PARTITION_NAME;
Posted by: Guest on March-16-2021
0

oracle gather table statistics

CALL DBMS_STATS.GATHER_TABLE_STATS(
    'OWNER_NAME',
    'TABLE_NAME',
    ESTIMATE_PERCENT => 50,			-- longer but better than 1 for exec plans
    GRANULARITY => 'PARTITION',   	-- or SUBPARTITION or nothing  
    PARTNAME => 'PARTITION_NAME', 	-- or nothing
    DEGREE => 8                 	-- parallelism
);
Posted by: Guest on March-16-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language