Need Help With SQL Statement Please

From: James A. Mumper <jamumper_at_ptes.com>
Date: 1996/05/01
Message-ID: <4m85du$t18_at_newshost.ptes.com>#1/1


In Loney's DBA book and the Oracle DBA book is a script which allows you to use existing data in a table to size the table. The script looks something like this:

	select
	   avg(nvl(vsize(column1),0))+
	   avg(nvl(vsize(column2),0)) avg_row_length
	from table_name;

What I would like to do is see if it is possible to make this script build itself. I have a database with umpteen tables in it, all with umpteen columns and I would rather not have to do a describe on all of them and then write this script.

The alternative to this is to ANALYZE the tables and then use the avg_row_len from dba_tables. Does anyone know whether these would be the same as the sql script would generate?

Any ideas on how this might be accomplished?

TIA, Jim Mumper

Senior Oracle DBA Received on Wed May 01 1996 - 00:00:00 CEST

Original text of this message