Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Question about database design--Varchar2

Re: Question about database design--Varchar2

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 03 Feb 2000 20:11:07 +0800
Message-ID: <3899705B.1E85@yahoo.com>


matthew_cromer_at_iname.com wrote:
>
> Our team is looking at how we design our Oracle database tables and
> discussion options on the best way to design them.
>
> One question we have is about fields that contain description
> information, where the description might usually be 20-50 characters,
> but we might occasionally make the description much longer.
>
> We are thinking it might be a good design decision to make all such
> fields Varchar2 (2000). We settled on 2000 because of problems reading
> larger fields via ODBC in some cases. What do you think of this design
> approach? Is there any reason to define the fields with shorter
> lengths? Can there be any performance issues with these fields being
> defined as maximum length 2000 when we will typically use much less?
>
> TIA,
>
> Matthew Cromer
> matthew_at_sdaconsulting.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Since varchars only use as much space as their content the 2000 size should not be a problem. What may be of concern however is if people actually start using all that space you end up with not very many rows per block. Even worse if people update small length comments to large length ones. These combined can lead to chaining and migration problems for your rows.

If you do want the space, maybe look at vertically partitioning the columns away from your "true" data ...

HTH
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Thu Feb 03 2000 - 06:11:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US