Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Speeding up LIKE '%something%'
Another solution is Intermedia
Raj
QOTD: Any clod can have facts, but having an opinion is an art!
-----Original Message-----
Sent: Wednesday, October 16, 2002 4:29 AM
To: Multiple recipients of list ORACLE-L
"Carle, William T (Bill), ALCAS" wrote:
>
> Howdy,
>
> I have a table that has almost 2 million rows called eventqueueentry.
The layout looks like this:
>
> Name Null? Type
> ----------------------------------------- --------
I think that if it's 'TrackingEventId' which REALLY interests your users (as opposed to any random string of characters within CONTENTS) you should train your users into expressing their query as something similar to
to_number(substr(CONTENTS, decode(instr(CONTENTS, 'TrackingEventId='), 0, length(CONTENTS), instr(CONTENTS, 'TrackingEventId=')+16), 8)) = 27668677
(I do *not* guarantee the number of parentheses :) and I assume that the
number is always 8-digit long - adapt).
This nice expression would allow you to create a function based index.
In fact, you could then create a view above the table which would
directly include a TRACKINGEVENTID column defined as above, and,
assuming the FBI, your users could query :
SELECT EventId, QueueType, Publisher, CreateTime, LastReadTime,
RemoveTime,
Contents, Ver
from
V_EventQueueEntry
where QueueType = 'CodeUpdate'
AND TrackingEventId=27668677
ORDER BY EventId
Another solution would be to add a column, and extract the information as it is inserted (trigger) to fill the column - which you would of course index.
If many different chunks of CONTENTS can be queried, I would consider Intermedia.
-- Regards, Stephane Faroult Oriole Software ----- End Forwarded Message ----- Regards, Stephane Faroult Oriole -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Stephane Faroul INET: sfaroult_at_oriolecorp.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Oct 16 2002 - 08:48:42 CDT-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Jamadagni, Rajendra INET: Rajendra.Jamadagni_at_espn.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
- text/plain attachment: ESPN_Disclaimer.txt
![]() |
![]() |