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: which column type char,varchar2 is better for index?

Re: which column type char,varchar2 is better for index?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Sat, 12 Jun 2004 10:25:52 +0000 (UTC)
Message-ID: <caelng$4el$1@titan.btinternet.com>

Note in-line

-- 
Regards

Jonathan Lewis

http://www.jlcomp.demon.co.uk

http://www.jlcomp.demon.co.uk/faq/ind_faq.html
The Co-operative Oracle Users' FAQ

http://www.jlcomp.demon.co.uk/seminar.html
Optimising Oracle Seminar - schedule updated May 1st


"Mark D Powell" <Mark.Powell_at_eds.com> wrote in message
news:2687bb95.0406110545.e66f62f_at_posting.google.com...

>
> When you test number verse varchar2 you should find very little
> practical difference though numeric key access should prove to be a
> little faster. At least it did when an Oracle support analyst posted
> some test results a couple years back.
>
There are two different scenarios, though. The speed of accessing a given amount of data, and the estimated cardinality for the where clause that is supposed to identify the data. Representing numeric (or date) information as character columns can cause the optimiser to get wildly inaccurate estimates of cardinality and therefore choose the wrong execution path. (Which brings you back to the performance question from a different direction).
Received on Sat Jun 12 2004 - 05:25:52 CDT

Original text of this message

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