View Single Post
Old 04-06-2006, 02:47 AM  
alex79
Confirmed User
 
Join Date: Jun 2002
Location: france
Posts: 996
mysql optimizing table question

I have a table with next structure:

Code:
CREATE TABLE `table` (
`keywords` TEXT NOT NULL
) TYPE = MYISAM ;
where the rows are like:
row1: keyword1,keyword2,keyword5,...
row2: keyword10,keyword435,keyword5123,keywordn...


i want to make selects like this:


Code:
select * from `table` where `keywords` like '%keyword2%'

how do i optimize the `table` for a such selects? if i create an index on `keywords` column don't help becouse index are created after the firsts characters from column and are useful for selects with where `keywords` like 'keyword2%' not for selects with where `keywords` like '%keyword2%'

How can optimize the table for a such select?
__________________
alex79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote