Gather stats for a database
--
--  Name: gather_database_stats.sql
--
--  Description: Gather stats for a database
--
--  Usage: @gather_database_stats 
--
--  Example: @gather_database_stats

BEGIN
   DBMS_STATS.GATHER_DATABASE_STATS(
		estimate_percent => null,
		method_opt       => 'FOR ALL INDEXED COLUMNS SIZE 1',
		degree           => 4,
		granularity      => 'ALL',
		cascade          => TRUE);
END;
/