Newsgroup: it.comp.software.database
Titolo: Dimensione righe tabelle oracle

Dove posso trovare informazioni per riuscire a calcolare l'esatta
occupazione di una riga di una tabella in oracle in base ai tipi dati
utilizzati?
Grazie
Claudio
--------------------------------
Inviato via 
http://arianna.libero.it/usenet/

 utilizzati?
come da SQL reference :
VARCHAR2( size) Variable-length character string having maximum
length size bytes. Maximum size is 4000, and
minimum is 1. You must specify size for
VARCHAR2.
NVARCHAR2( size) Variable-length character string having maximum
length size characters or bytes, depending on the
choice of national character set. Maximum size is
determined by the number of bytes required to store
each character, with an upper limit of 4000 bytes.
You must specify size for NVARCHAR2.
NUMBER( p,s) Number having precision p and scale s. The
precision p can range from 1 to 38. The scale s can
range from -84 to 127.
LONG Character data of variable length up to 2 gigabytes,
or 231 -1 bytes.
DATE Valid date range from January 1, 4712 BC to
December 31, 9999 AD.
RAW( size) Raw binary data of length size bytes. Maximum
sizeis 2000 bytes. You must specify sizefor a RAW
value.
LONG RAW Raw binary data of variable length up to 2
gigabytes.
ROWID Hexadecimal string representing the unique address
of a row in its table. This datatype is primarily for
values returned by the ROWID pseudocolumn.
UROWID [( size)] Hexadecimal string representing the logical address
of a row of an index-organized table. The optional
size is the size of a column of type UROWID. The
maximum size and default is 4000 bytes.
CHAR( size) Fixed-length character data of length size bytes.
Maximum size is 2000 bytes. Default and
minimum size is 1 byte.
NCHAR( size) Fixed-length character data of length size
characters or bytes, depending on the choice of
national character set. Maximum size is
determined by the number of bytes required to store
each character, with an upper limit of 2000 bytes.
Default and minimum size is 1 character or 1 byte,
depending on the character set.
CLOB A character large object containing single-byte
characters. Both fixed-width and variable-width
character sets are supported, both using the CHAR
database character set. Maximum size is 4 gigabytes.
NCLOB A character large object containing multibyte
characters. Both fixed-width and variable-width
character sets are supported, both using the NCHAR
database character set. Maximum size is 4 gigabytes.
Stores national character set data.
BLOB A binary large object. Maximum size is 4 gigabytes.
BFILE Contains a locator to a large binary file stored
outside the database. Enables byte stream I/O
access to external LOBs residing on the database
server. Maximum size is 4 gigabytes.
felice_pago


 felice_pago
Ni hao, Lelle.

 v2 VARCHAR2(2000) := '1'; -- occupa 1 carattere
oddio non ho fatto caso ai varchar2, ma tant'e'
1+ 1 per il descrittore di tipo :)
quella era sql*reference dell 817, se non erro,
ma solo per dire al tipo dove andare a prenderseli,
sempre comunque e dovunque :)


 felice_pago
Ni hao, Lelle.

 ??? non ho capito :-(
cioe' per dire di che tipo di dato si tratta, da qualche parte deve pur
scriverlo :)
o per lo meno e' la risposta che IO MI sono dato a questo calcolo :
SELECT AVG(
       NVL(VSIZE(DATA_OPERAZIONE),0)+1
       +NVL(VSIZE(TIPO_OPERAZIONE),0)+1
       +NVL(VSIZE(ID_ELABORAZIONE),0)+1
       +NVL(VSIZE(ID_CONTRATTO),0)+1
       +NVL(VSIZE(COD_FABBRICA_PACCHETTO),0)+1
       +NVL(VSIZE(COD_PACCHETTO),0)+1
       +NVL(VSIZE(NUMERO_CONTRATTO),0)+1
       +NVL(VSIZE(ID_SOGG_ANAGR_VENDITORE),0)+1
       +NVL(VSIZE(COD_MEZZO_PAGAMENTO),0)+1
       +NVL(VSIZE(COD_TIPO_CONTRATTO),0)+1
       +NVL(VSIZE(DATA_STIPULA),0)+1
       +NVL(VSIZE(DATA_INIZIO_VALIDITA),0)+1
       +NVL(VSIZE(DATA_FINE_VALIDITA),0)+1
       +NVL(VSIZE(COD_RETE),0)+1
       +NVL(VSIZE(DATA_INSERIMENTO),0)+1
       +NVL(VSIZE(COD_UTENTE_INSERIMENTO),0)+1
       +NVL(VSIZE(DATA_ULTIMA_VARIAZ),0)+1)
AVGSIZE
FROM tab ;
e sarebbe appunto quel +1
