Home » SQL & PL/SQL » SQL & PL/SQL » Maximum size of a record in kb
Maximum size of a record in kb [message #332311] Tue, 08 July 2008 03:10 Go to next message
hedonist123
Messages: 119
Registered: August 2007
Senior Member
Hi,

I wish to know the maximum size of a record in a table assuming that all the fields have data that are of maximum length.

For e.g. the table I have has 3 columns of varchar2(30), 3 float, 2 number(10) and 2 date and 2 timestamp columns. In addition to this, there is a raw dataype column.

Could you please tell me how to compute this approximately?

Thanks,

Sharath
Re: Maximum size of a record in kb [message #332324 is a reply to message #332311] Tue, 08 July 2008 03:52 Go to previous messageGo to next message
mfinn
Messages: 9
Registered: July 2008
Location: UK
Junior Member
Try using the data dictionary table all_tab_columns

This will allow you to get the type/size of each column
Re: Maximum size of a record in kb [message #332351 is a reply to message #332311] Tue, 08 July 2008 05:05 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
What's the max length of a raw column?
Re: Maximum size of a record in kb [message #332354 is a reply to message #332351] Tue, 08 July 2008 05:08 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Same as a Varchar2 I believe.

<pause for testing>

I'm wrong - it's 2000 chrs.
Just try
 create table test_0039 (col_1 number, col_2 raw(4000));
Re: Maximum size of a record in kb [message #332355 is a reply to message #332351] Tue, 08 July 2008 05:10 Go to previous messageGo to next message
hedonist123
Messages: 119
Registered: August 2007
Senior Member
it has been created as raw(16) in my db. So, will the maximum length also be the same?
Re: Maximum size of a record in kb [message #332356 is a reply to message #332355] Tue, 08 July 2008 05:13 Go to previous message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Yup - 16 bytes
Previous Topic: SQL QUERY for distinct items
Next Topic: Finding distinct elements from Array
Goto Forum:
  


Current Time: Sun Dec 04 08:34:49 CST 2016

Total time taken to generate the page: 0.09554 seconds