Home » RDBMS Server » Server Administration » Space considerations??
Space considerations?? [message #143539] Thu, 20 October 2005 16:07 Go to next message
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 Go to previous messageGo to next message
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 >

Re: Space considerations?? [message #143545 is a reply to message #143541] Thu, 20 October 2005 16:54 Go to previous message
dop615
Messages: 2
Registered: October 2005
Junior Member
Thanks!
What thoughts do you have about the encryption question
Previous Topic: database size
Next Topic: Reinstating tablespace using datafile
Goto Forum:
  


Current Time: Tue Feb 04 01:07:28 CST 2025