Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MySQL Syntax:  ANALYZE TABLE table_name
http://dev.mysql.com/doc/refman/5.5/en/analyze-table.html

PostgreSQL Syntax:  ANALYZE table_name
http://www.postgresql.org/docs/8.4/static/sql-analyze.html

Oracle Syntax:  exec dbms_stats.gather_table_stats('schema', 'table_name', cascade => TRUE);
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_stats.htm

Note, you can analyze a subset of the rows in oracle if you have a lot of data

Code Block
select 'ANALYZE TABLE ' || table_name || ' estimate STATISTICS sample 100000 rows;' as script from user_Tables where table_name like 'GROUPER%'
 
e.g. ANALYZE TABLE GROUPER_ATTRIBUTES estimate STATISTICS sample 100000 rows;
 



In all cases, substitute "table_name" with each table that you want to have analyzed.  For Oracle, also substitue "schema" with the database schema for your Groups Registry.

MySQL example...

...