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

Fastest access on varchar keyed table...

From: Andreas Koch <mail_at_kochandreas.com>
Date: Fri, 23 Nov 2001 19:13:34 +0100
Message-ID: <9tm3ks$uqd$06$1@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 - 12:13:34 CST

Original text of this message

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