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: Numerical vs. Character Indexes

Re: Numerical vs. Character Indexes

From: Igor V. Podolsky <igoryok_at_soft-review.kiev.ua>
Date: Mon, 24 Jan 2000 13:40:24 +0200
Message-ID: <AArd3Zuy90w@soft-review.kiev.ua>


Jerry Gitomer <jgitomer_at_erols.com> wrote in message news:388BE884.DF2605F_at_erols.com...

> My rule of thumb -- admittedly a carryover from my days as a 3GL
> programmer -- is to only use NUMBER when the column is used for
> computations. Otherwise use VARCHAR2 unless valid values are
> fixed length and length is used in validity checking in which
> case I prefer to use CHAR.

I'm absolutelly agree. Main reason: I prefer correct database structure to questionable perfomance increase. There is a lot of ways for perfomance turning (indexing, query turning, finally server-side hardware enhancement) but there is no simple ways for workaround with incorrect datatypes. For example, if You choosed INTEGER datatype to store document number. I't possible You got some perfomance increase. But You could do nothing if You need store a document with '12/7-1' number. And if You choosed varchar2 datatype and got bad perfomance, You can create simple or bitmap index, or make table partitioned or install additional memory to database server mashine and so on... Similar situation is possible with any non-additive (non-multiplicative etc) attribute. So, it's better to choose datatypes corresponding to data nature anyway.

--
Is There A God Or Any Kind Of Justice Under The Sky... (Queen'91)

Igor V. Podolsky (igoryok_at_soft-review.kiev.ua) Received on Mon Jan 24 2000 - 05:40:24 CST

Original text of this message

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