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: NUMBER versa CHAR as a primary key ?

Re: NUMBER versa CHAR as a primary key ?

From: Rich Mycroft <rich.mycroft_at_synchrologic.com>
Date: 2000/07/27
Message-ID: <qYVf5.552$Dw6.4773@newsfeed.slurp.net>#1/1

Most times this also has to do with the length of the field involved. If you have a four byte numeric field you're going to get better results than for a 32 byte char field. Varchar is worse in every db I've ever seen as they store a length indicator along with the data - so the db engine then winds up checking the length before even doing the comparison. The general rule is shorter, fixed length fields are better than longer variable length fields.

Rich Mycroft

"Peter Chong" <pchq45_at_nospam.hotmail.net> wrote in message news:eCPf5.9143$qM3.56653_at_news1.bnapk1.occa.home.com...
> In General, In Most DB from the beginning, Value Inside of CHAR is more
> fragment than Number
> Some how hashing routine is work better for not contiguous number in value
> like CHAR.
> Peter C.
> Janusz Gryczman <janusz_at_winternet.com> wrote in message
> news:397FBC29.A6A5CEE0_at_winternet.com...
> > Is it true, that using NUMBER Oracle type versa CHAR for a primary key
> > improves performance ?
> > If yes what is the ratio ? Is it really significant ?
> > What about if primary key has a type VARCHAR ?
> > Really appreciate answer to this question.
> >
>
>
Received on Thu Jul 27 2000 - 00:00:00 CDT

Original text of this message

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