Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: indexing table by word not by column

Re: indexing table by word not by column

From: TurkBear <noone_at_nowhere.com>
Date: Tue, 20 Mar 2001 09:00:47 -0600
Message-ID: <evrebtoj5uqm23enrr74p3ml8i70mbggvl@4ax.com>

Another approach, if slower, would be to concatenate your search column:

select * from table where column1||column2||column3||column4 like '%word%';

Give it a try...

"Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:

>
>"ori" <ori_m57_at_hotmail.co.il> wrote in message
>news:tbck5q4cc3n7e6_at_corp.supernews.com...
>> Hi there,
>>
>> Is there a way to index a table by word and not by column?
>> for example:
>> If my table have 4 colomn (each one is a var char) which all may contain
 the word I am looking
>> for , the sql for such un unindex table would be something like:
>>
>> Select column1, column2, column3, column4 from table where (column1 like
 '%word%') or (column2
>> like '%word%') or (column3 like '%word%') or (column4 like '%word%')
>>
>> which will take forever to run on 100,000 rows.
>>
>> if I could do some index like a table contain the key word and the row
 number maybe something like
>> word: rows:
>> abc 1,2,3,4
>> def 2,3,11
>>
>> then this search will go much faster...
>> Is there a way to create such an object?
>>
>> thanks
>>
>> ori
>>
>> --
>> Posted via CNET Help.com
>> http://www.help.com/
>
>Oracle Intermedia has been designed to meet this need.
>
>Hth,
>
>Sybrand Bakker, Oracle DBA
>
>
Received on Tue Mar 20 2001 - 09:00:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US