Tag Archives: mysql query optimization

Why MySQL FULLTEXT Search Returns 0 Results (And How to Fix It)

phpMyAdmin SQL to alter table to InnoDB for database optimization

When optimizing custom database search queries by replacing standard SQL LIKE '%keyword%' queries with MySQL MATCH() AGAINST() full-text search, you might encounter a frustrating wall: the query returns 0 results, even when the search terms exist repeatedly across your database.

You created the FULLTEXT index, wrote the SQL query, and verified the matching records exist - yet MySQL returns an empty result set.

Here is why MySQL silently drops valid search terms in Natural Language Mode, and how to resolve

... Continue reading
Posted in Coding, Server Admin & Security | Tagged , , , , , , , , , , , , , , , , | Leave a comment

The Ultimate Guide to MySQL Query Optimization

PHPMyAdmin MySQL Explain Analyze command for optimizing slow queries

At its core, query optimization comes down to one goal: Make the database read as few rows as possible.

If MySQL reads 300,000 rows to return 5 results, it is slow. If it reads 5 rows to return 5 results, it is lightning fast.

In The Developer’s Guide to Identifying Slow MySQL Queries, we covered the mechanics of finding your slowest queries using server logs and gave a brief introduction to the EXPLAIN command.

But once you’ve identified a slow query,

... Continue reading
Posted in Coding, Server Admin & Security | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment