Natural Language Full-Text Searches (’1001 MySQL Tricks’,’1. Never run mysqld as root. 2. ...’), (’MySQL vs. YourSQL’,’In the following database comparison ...’), (’MySQL Security’,’When configured properly, MySQL ...’); Query OK, 6 rows affected (0.01 sec) Records: 6 Duplicates: 0 Warnings: 0 mysql>  SELECT * FROM articles WHERE MATCH (title,body) AGAINST (’database’ IN NATURAL LANGUAGE MODE); +----+-------------------+------------------------------------------+ | id | title | body | +----+-------------------+------------------------------------------+ | 1 | MySQL Tutorial | DBMS stands for DataBase ... | | 5 | MySQL vs. YourSQL | In the following database comparison ... | +----+-------------------+------------------------------------------+ 2 rows in set (0.00 sec) By default, the search is performed in case-insensitive fashion. To perform a case-sensitive full-text search, use a case-sensitive or binary collation for the indexed columns. For example, a column that uses the  utf8mb4  character set of can be assigned a collation of  utf8mb4_0900_as_cs  or  utf8mb4_bin  to make it case-sensitive for full-text searches. When  MATCH()  is used in a  WHERE  clause, as in the example shown earlier, the rows returned are automatically sorted with the highest relevance first. Relevance values are nonnegative floating-point numbers. Zero relevance means no similarity. Relevance is computed based on the number of words in the row (document), the number of unique words in the row, the total number of words in the collection, and the number of rows that contain a particular word. The term “document”  may be used interchangeably with the term “row” , and both terms refer to the indexed part of the row. The term “collection”  refers to the indexed columns and encompasses all rows. To simply count matches, you could use a query like this: Note mysql>  SELECT COUNT(*) FROM articles WHERE MATCH (title,body) AGAINST (’database’ IN NATURAL LANGUAGE MODE); +----------+ | COUNT(*) | +----------+ | 2 | +----------+ 1 row in set (0.00 sec) mysql>  SELECT COUNT(IF(MATCH (title,body) AGAINST (’database’ IN NATURAL LANGUAGE MODE), 1, NULL)) AS count FROM articles; +-------+ | count | +-------+ | 2 | +-------+ 1 row in set (0.03 sec) The first query does some extra work (sorting the results by relevance) but also can use an index lookup based on the  WHERE  clause. The index lookup might make the first query faster if the search matches few rows. The second query performs a full table scan, which might be faster than the index lookup if the search term was present in most rows. You might find it quicker to rewrite the query as follows: 2204