I need to perform a search to check if at least 1 item exists that satisfies the criteria:
The table is 3 million rows. Each row has "Name", "Vendor", "Ticked", "Favourites" and some other columns.
(if "Ticked"=1 then we ignore this row)
I am using a Fulltext index for the first 2 columns, although the search is still too slow.
Here is my SQL:
SELECT COUNT(`ID`) AS cnt
SELECT * FROM `catalog_".$partner_table_name."`
) as t";
My search requirements are:
1) I want the search for 'Name' to NOT be precise but be like 'LIKE (% . . . %)'
2) Vendor column must search for precise words but not the whole string.
Search : 'jordan'
Results: 'Air Jordan', 'Jordan', 'Nike Jordan', 'Nike Air Jordan'
Thank you very much for help!!