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: Fastest access on varchar keyed table...

Re: Fastest access on varchar keyed table...

From: Jim Kennedy <kennedy-family_at_home.com>
Date: Fri, 23 Nov 2001 21:39:19 GMT
Message-ID: <bmzL7.65522$XJ4.37312901@news1.sttln1.wa.home.com>

  1. You could make the fullname unique. I doubt it actually is.
  2. You could store the table in a hash cluster if you know a reasonable upper limit of the rows. Have the hash on the fullname. They you would get the row in one read. Jim "Andreas Koch" <mail_at_kochandreas.com> wrote in message news:9tm3ks$uqd$06$1_at_news.t-online.com...
    > Hi,
    >
    > we have a table like
    > table emp (
    > fullname varchar2(250),
    > age number(3)
    > )
    > with a few thousand entries
    > (on a simple, small "default installation" DB)
    >
    > No matches on other tables are made. The table is
    > written once/rarely and read very often.
    >
    > What is the fastest way to get the age of "John Doe" ?
    >
    > A simple "select age from emp where fullname='John Doe'" ?
    > Could it make the query faster if we extended the
    > table by a
    >
    > lengthofname number(3)
    >
    > and do a
    >
    > select age from emp where lengthofname=8 and fullname='John Doe' ?
    >
    > --
    > Andreas
    > Who doesn't live can never die
    >
Received on Fri Nov 23 2001 - 15:39:19 CST

Original text of this message

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