Category: PHP, MySQL

You have a MySQL database with one ore more columns of type TEXT containing arbitrary free text. You have many rows and a lot of text in each column and you experience very poor performance when using LIKE statements to perform a full text search: A faster way to perform a full text search is the MATCH AGAINST statement: Note the “‘\“” that is wrapped around the search phrase. This is important to make sure you are searching for that exact phrase and not the individual words it contains. For MATCH AGAINST to perform well you need to create a full text index on the column you want to search: If your MySQL version is below 5.6, you have to change the engine to MyISAM. Make sure MyISAM works for you: You can also create a separate table with engine MyISAM only for Fulltext searching purposes.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners