Oracle FAQ
|
Your Portal to the Oracle Knowledge Grid
|
Home ->
Community ->
Usenet ->
c.d.o.misc ->
Re: Fastest access on varchar keyed table...
Re: Fastest access on varchar keyed table...
- You could make the fullname unique. I doubt it actually is.
- 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