Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Fastest access on varchar keyed table...
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 dieReceived on Fri Nov 23 2001 - 12:13:34 CST
![]() |
![]() |