Running stats on multiple tables
839981Feb 15 2011 — edited Feb 15 2011Hi,
I'm trying to run statistics on a custom list of tables and later on would create a job to run this nightly.
I'm having an issue with the syntax. I can run statistics on one table, but when I try an add in multiple tables it fails. I know it's failing on the tabname section when adding in the 2nd table and so forth. Do I have to separate each table stats into its own unique statement for each table or can I lump it all into 1 exec gather_table_stats statement?
exec dbms_stats.gather_table_stats(ownname=>'SYSADM',tabname=>'table1', 'table2',estimate_percent=> 100,method_opt=>'FOR ALL COLUMNS SIZE AUTO',cascade=>TRUE)
Any help would be greatly appreciated. Thanks in advance!