Histograms: 32 character limit generates inaccurate stats
Hi guys,
The following entry is in the crontab :
The contents of the script executed are as follows:
And the contents of the stored procedure that the script runs is listed below:
The following entry is in the crontab :
$ crontab -l | grep fix 0 7 * * * /usr/mvf/fix_uid_bug.sh >/dev/null
The contents of the script executed are as follows:
$ cat /usr/mvf/fix_uid_bug.sh #!/bin/bash . /usr/mvf/.bashrc echo "execute sys.fix_uid_bug;"| sqlplus dbadmin/dbadmin
And the contents of the stored procedure that the script runs is listed below:
SQL> set pagesize 0; SQL> select text from dba_source where name='FIX_UID_BUG'; procedure fix_uid_bug as n1 pls_integer; n2 pls_integer; begin select num_rows into n1 from dba_tables where table_name='T1'; select num_rows into n2 from dba_tables where table_name = 'T2'; if n1 <> 0 then DBMS_STATS.SET_COLUMN_STATS(ownname=>'DBADMIN', tabname=>'T1',colname=>'COL1',distcnt=>n1,density=>1/n1); end if; if n2 <> 0 then DBMS_STATS.SET_COLUMN_STATS(ownname=>'DBADMIN', tabname=>'T2',colname=>'COL2',distcnt=>n2,density=>1/n2); end if; execute immediate 'alter system flush shared_pool'; end;
0