T
T
Theory Theory2020-11-13 17:55:52
MySQL
Theory Theory, 2020-11-13 17:55:52

Why doesn't mysql index work?

Created an index like this:

ALTER TABLE news ADD FULLTEXT INDEX idx_content (content)

I see index has been created: 5fae9cbf2c784302069614.png
Request:
SELECT * FROM news WHERE MATCH (content) AGAINST ('book') LIMIT 10


But in the end the result is irrelevant. entries with fewer matches are returned first, and so on.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2020-11-13
@Narbek

Because WHERE does not sort the result, but only filters by condition.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question