![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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 ; 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? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Apr 2002
Location: /root/
Posts: 4,997
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Apr 2002
Location: /root/
Posts: 4,997
|
also another option (fastest) would be
table keywords (entry_id int auto_increment, keywords text, primary key(entry_id)) table keywords_index (keyword varchar(16), simulated_array varchar(256)) where simulated_array would reference table keywords its more work but its the fastest for search |
![]() |
![]() ![]() ![]() ![]() ![]() |