How to speed up the search with OR criteria

From: Alan Tai <alantai>
Date: 1996/01/31
Message-ID: <4eojqp$m76_at_orange.ConcordPacific.Com>#1/1


I wonder how to speed up the response time of SQL statements like " SELECT * FROM table1 WHERE field1 LIKE 'A%' OR field2 LIKE 'A%';" and " SELECT COUNT(*) FROM table1 WHERE field1 LIKE 'A%' OR field2 LIKE 'A%';". I tried to create seperative or compositive indexes for field1 and field2. But no matter what kind of indexes I created, I found that Oracle didn't use the index. Even though I use hint in the statement.

I look forward any suggestion from anyone.

Thanks.
Alan.


Alan Tai                	| alantai_at_multiactive.com           
New Media Promotions            | 1095 West Pender St., 10th Floor 
MultiActive Technologies	| Vancouver, BC  V6E 2M6             
				| PH: 604-895-8282  FAX: 683-2668

--------------------------------------------------------------------------
Received on Wed Jan 31 1996 - 00:00:00 CET

Original text of this message