| Gather schema statistics [message #530726] |
Thu, 10 November 2011 01:02  |
|
|
Hi all,
I have one doubt regarding collecting schema statistics in database using command.
which is the right way to collect schema statistics among the below 2 commands?
1.EXECUTE DBMS_STATS.GATHER_SCHEMA_STATS(OWNNAME => 'BALA',
METHOD_OPT=> 'FOR ALL INDEXED COLUMNS',DEGREE => 8,CASCADE => TRUE);
2.exec dbms_stats.gather_table_stats (user, 'test');
Please clarify
Regards,
|
|
|
|
|
|
| Re: Gather schema statistics [message #530744 is a reply to message #530734] |
Thu, 10 November 2011 02:32   |
|
|
Thanks Michel.
So it means,we should use the other command to collect schema statistics.
Quote:EXECUTE DBMS_STATS.GATHER_SCHEMA_STATS(OWNNAME => 'BALA',
METHOD_OPT=> 'FOR ALL INDEXED COLUMNS',DEGREE => 8,CASCADE => TRUE);
Here in this above command , can you tell me what number we should give in place of DEGREE parameter?
|
|
|
|
|
|
| Re: Gather schema statistics [message #530753 is a reply to message #530747] |
Thu, 10 November 2011 04:57   |
|
|
Hi,
I am getting below error while trying to gather table statistics.
SQL>
SQL> EXECUTE DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>'DEMO,TABNAME=>'PARTS_EXCLUDED_TAB','PARTS_EXCLUDED_AUDIT_TAB','PART_PRICE_TAB','PART_TAB','PART_DESCRIPTION_TAB',METHOD_OPT= >'FOR ALL INDEXED COLUMNS',DEGREE => 8,CASCADE => TRUE);
BEGIN DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>'RIMSPO',TABNAME=>'PARTS_EXCLUDED_TAB','PARTS_EXCLUDED_AUDIT_TAB','PART_PRICE_TAB','PART_TAB','PART_DESCRIPTION_TAB',METHOD_OPT= >'FOR ALL INDEXED COLUMNS',DEGREE => 8,CASCADE => TRUE); END;
Quote: *
ERROR at line 1:
ORA-06550: line 1, column 85:
PLS-00312: a positional parameter association may not follow a named
association
ORA-06550: line 1, column 7:
Please tell me how to fix this error.
Thanks
|
|
|
|
|
|
|
|
| Re: Gather schema statistics [message #530761 is a reply to message #530759] |
Thu, 10 November 2011 05:20   |
|
|
Thank you both for helping me gathering table statistics.
Before seeing your answers, i gathered tables one by one and it works.
Your answers proved that there is no way of gathering multiple tables at a time
using DBMS_STATS.GATHER_TABLE_STATS package
Thank you..
|
|
|
|
|
|