How to get query to use an index
- From: "Josh Collier" <collier_jw@xxxxxxxxxxx>
- To: "'oracle-l'" <oracle-l@xxxxxxxxxxxxx>
- Date: Tue, 11 Apr 2006 13:13:16 -0700
Query is currently using a full tablescan
There are two indexes.
One on cus01wrph
One on cushoph
If I just put in one or the other (either cusoph or cus01wrph) then the index is
used.
SELECT cus.cusky, cus.cliky, cus.cus01frnm, cus.cus01lanm, cus.cusblad01,
cus.cusblad02, cus.cusblcity, cus.cusblstate, cus.cusblzip,
cus.cusblcntry, cus.cusad01, cus.cusad02, cus.cuscy, cus.cusst,
cus.cuszp, cus.cuscountry, cus.cus01email, cus.cushoph, cus.cus01wrph,
cus.wpa_change
FROM cus_current_row cus
WHERE ( cushoph LIKE SYS_CONTEXT ('MY_CTX_wpaods', 'phone')
OR cus01wrph LIKE SYS_CONTEXT ('MY_CTX_wpaods', 'phone')
)
Thanks for your help,
Josh C.
--
http://www.freelists.org/webpage/oracle-l
- Follow-Ups:
- Re: How to get query to use an index
- From: Tim Gorman
- References:
- metalink security paper
- From: Ray Stell
Other related posts:
- » How to get query to use an index
- » Re: How to get query to use an index
- » Re: How to get query to use an index
- » RE: How to get query to use an index
- » Re: How to get query to use an index
- » RE: How to get query to use an index
- » Re: How to get query to use an index
- » Re: How to get query to use an index
- » RE: How to get query to use an index
- » Re: How to get query to use an index
- » Re: How to get query to use an index
- » Re: How to get query to use an index
- » RE: How to get query to use an index
- » Re: How to get query to use an index
- » Re: How to get query to use an index
- Re: How to get query to use an index
- From: Tim Gorman
- metalink security paper
- From: Ray Stell