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: Does varchar2 size matter?

Re: Does varchar2 size matter?

From: HansF <News.Hans_at_telus.net>
Date: Fri, 03 Jun 2005 00:34:49 GMT
Message-Id: <pan.2005.06.03.00.37.42.222493@telus.net>


On Thu, 02 Jun 2005 16:35:36 -0700, tedb interested us by writing:

> What are the repercussions of declaring all strings varchar2(255) even
> if many will have lengths <=20 or <=30 (but none >255)?
>
> Is there any value declaring some to be varchar2(20) or varchar2(30)
> rather than just making them all varchar2(255)?
>
> I'm converting a MySQL database to Oracle. By default MySQL accepts
> strings too long and overwrites memory, which is okay as long as the
> memory is unusued, but becomes a problem when it overwrites used
> memory.
>
> Thanks,
> Ted Bogart

Depends on your application. Generally no impact on the database.

Can your app handle freestyle ranges from 0-255 bytes? Does it really make sense? DO you want to rely on your app developers to make the correct decision ALL the time or do you want to put an added integrity check at the one-and-only place that you are guaranteed to hit. (Meaning, users have a habit of bypassing apps using Access, Excel, etc. and royally messing data that isn't protected by constraints.)

-- 
Hans Forbrich                           
Canada-wide Oracle training and consulting
mailto: Fuzzy.GreyBeard_at_gmail.com   
*** I no longer assist with top-posted newsgroup queries ***
Received on Thu Jun 02 2005 - 19:34:49 CDT

Original text of this message

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