Script to generate histograms upon columns that are part of an equijoin, where clause, etc.
I have this script which generates histograms for columns that are part of an equijoin.
Everything goes Ok when generating the "METHOD_OPT" text, but when I try to execute, it says that the text is long, the script is:
 SET PAGES 0;
 SET FEEDBACK OFF;
 SPOOL $TABLAS
 SELECT ''''||UPPER(owner)||''''||' '||''''||UPPER(table_name)||''''
 FROM dba_tables
 WHERE owner IN ('owner')
   AND temporary != 'Y'
 ORDER BY owner DESC, table_name;
 SPOOL OFF;
!
if [ ! -f $TABLAS ]
then
 echo 'No existe el archivo de tablas!!!' >>$LOG
 exit 5
fi
echo "Inicio analisis: `date`" >>$LOG
total=`wc -l $TABLAS | awk '{print $1}'`