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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle database configuration options

Re: Oracle database configuration options

From: Paul Brewer <paulb_at_pbrewer.demon.co.uk>
Date: 1996/10/27
Message-ID: <Lli5bBAR45cyEwCP@pbrewer.demon.co.uk>#1/1

In article <$pVmEEAfQMcyEwVk_at_jimsmith.demon.co.uk>, Jim Smith <jim_at_jimsmith.demon.co.uk> writes
<snip>
>Oracle7 provides 2 character datatypes - CHAR is fixed length and
>VARCHAR2 is variable length. This is the behaviour required by the ANSI
>SQL standard. (there is also VARCHAR which is identical to VARCHAR2, but
>which Oracle recommends should not be used.
<snip>

We're just starting out moving our legacy applications to Oracle. One design thought which has been bothering me for a while... Most of the stuff I've read says basically: 'Use CHAR for fixed length stuff, and VARCHAR2 for variable'.
Seemed sensible to us, but we then gave ourselves problems in dynamic queries, where, for example, a CHAR(4) column contained 'ABC '. Of couse, we had to remember to space-fill user input before constructing 'where' clauses.
So we thought 'OK, let's just use VARCHAR2 all the time', but were advised that this wasn't a good idea, as there would be a significant performance impact when using VARCHAR2 columns in indexes, so we didn't bother.
We're not yet too far down the road to change our approach, and would welcome any comments or suggestions on this. TIA. Paul Brewer Received on Sun Oct 27 1996 - 00:00:00 CDT

Original text of this message

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