Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to improve "select num from telebook where num like '%345%'"
As was mentioned in an earlier post, you could use the new function indexes in 8i. If you are not capable of building a function index because you are not in version 8i, you could actually split the field into three parts. Those parts would be AREA_CODE, PHONE_PREFIX, and PHONE_LINE. Then you could build your index on PHONE_PREFIX. Also, in todays world, with phone numbers always changing area codes, it may make more sense to split these apart anyway.
Dave
dave_at_etci.net
qiangye_at_my-deja.com wrote:
> We have a huge table storing all of the telephone numbers of the city.
> The query is to retrieve all the numbers which contain "345" in the
> middle position. The current performance is too slow. Anybody knows how
> to improve the performance like that query?
>
> Thanks in advance!
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Wed Sep 06 2000 - 20:31:28 CDT