Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Please HELP
In article <3678376B.670_at_cc.utexas.edu>,
j.lyons_at_cc.utexas.edu wrote:
> mike_pinker_at_iint.com wrote:
>
> > Yes, the solution would work but using UPPER(THENAME) in the WHERE clause
> > would prohibit the use of any index on the THENAME column ( forcing a full
> > table scan). You could add another column called THENAME_UPPER which is
> > populated with the THENAME in capitals on insert ( e.g. by a trigger ).
Index
> > this column and you could then use the select below:
> >
> > SELECT * FROM MYTABLE WHERE THENAME_UPPER LIKE '%WOOD%';
>
> Would an index be used in a LIKE comparison which is not anchored
> at the start? I believe "... LIKE 'WOOD%'" could use an index
> but not "...LIKE '%WOOD%".
>
Yes, a leading wildcard prevents the index from being used.
--
Ed Prochak
Magic Interface, Ltd.
440-498-3702
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Dec 17 1998 - 14:28:45 CST
![]() |
![]() |