Space considerations?? [message #143539] |
Thu, 20 October 2005 16:07 |
dop615
Messages: 2 Registered: October 2005
|
Junior Member |
|
|
If you are using a char(10) in a column how much space does it take if the value is NULL
Also, When considering using 128 bit encryption on for example, a number(15) do you need to allow for more space?
Thanks!
|
|
|
Re: Space considerations?? [message #143541 is a reply to message #143539] |
Thu, 20 October 2005 16:14 |
smartin
Messages: 1803 Registered: March 2005 Location: Jacksonville, Florida
|
Senior Member |
|
|
MYDBA@ORCL >
MYDBA@ORCL > start space;
MYDBA@ORCL >
MYDBA@ORCL > create table test(a char(10));
Table created.
MYDBA@ORCL >
MYDBA@ORCL > insert into test values (null);
1 row created.
MYDBA@ORCL > insert into test values (null);
1 row created.
MYDBA@ORCL >
MYDBA@ORCL > select count(*) from test;
COUNT(*)
----------
2
1 row selected.
MYDBA@ORCL >
MYDBA@ORCL > exec dbms_stats.gather_table_stats(user,'test');
PL/SQL procedure successfully completed.
MYDBA@ORCL >
MYDBA@ORCL > select avg_row_len from user_tables where table_name = 'TEST';
AVG_ROW_LEN
-----------
1
1 row selected.
MYDBA@ORCL >
MYDBA@ORCL > insert into test values ('x');
1 row created.
MYDBA@ORCL >
MYDBA@ORCL > select count(*) from test;
COUNT(*)
----------
3
1 row selected.
MYDBA@ORCL >
MYDBA@ORCL > exec dbms_stats.gather_table_stats(user,'test');
PL/SQL procedure successfully completed.
MYDBA@ORCL >
MYDBA@ORCL > select avg_row_len from user_tables where table_name = 'TEST';
AVG_ROW_LEN
-----------
4
1 row selected.
MYDBA@ORCL >
MYDBA@ORCL > drop table test;
Table dropped.
MYDBA@ORCL >
MYDBA@ORCL > set echo off;
MYDBA@ORCL >
|
|
|
|