0
我有這樣全文搜索vely慢
DATABASE
warehouse_folders
folder_id
folder_box_id
folder_number
folder_title
folder_content
folder_notes
warehouse_folder_value
folder_value_id
folder_value_folder_id
folder_value_01
folder_value_02
folder_value_03
folder_value_04
folder_value_05
folder_value_06
folder_value_07
folder_value_08
folder_value_09
folder_value_00
folder_value_11
folder_value_12
warehouse_box
box_id
box_number
box_description
數據庫**約40.000線。 所有字段都是varchar,並且我爲所有字段創建了索引。
我想執行全文搜索(PHP和MySQL_),但是當添加JOINS數據庫停止響應。
任何幫助解決?**
QUERY
SELECT
*
FROM
warehouse_folders
LEFT JOIN
warehouse_folder_value ON folder_value_id = folder_id
LEFT JOIN
warehouse_boxes ON box_id = folder_box_id
WHERE
(
(`box_number` LIKE '%".$search."%') OR
(`box_description` LIKE '%".$search."%') OR
(`folder_number` LIKE '%".$search."%') OR
(`folder_title` LIKE '%".$search."%') OR
(`folder_content` LIKE '%".$search."%') OR
(`folder_notes` LIKE '%".$search."%') OR
(`folder_value_01` LIKE '%".$search."%') OR
(`folder_value_02` LIKE '%".$search."%') OR
(`folder_value_03` LIKE '%".$search."%') OR
(`folder_value_04` LIKE '%".$search."%') OR
(`folder_value_05` LIKE '%".$search."%') OR
(`folder_value_06` LIKE '%".$search."%') OR
(`folder_value_07` LIKE '%".$search."%') OR
(`folder_value_08` LIKE '%".$search."%') OR
(`folder_value_09` LIKE '%".$search."%') OR
(`folder_value_10` LIKE '%".$search."%') OR
(`folder_value_11` LIKE '%".$search."%') OR
(`folder_value_12` LIKE '%".$search."%')
)