L
L
Ly2018-03-29 07:27:27
MySQL
Ly, 2018-03-29 07:27:27

How to organize a quick search?

There is a 1 million+ base with audio information.
It is necessary to do a search in the artist and/or title fields.
What is the best and fastest way to implement this?
LIKE % searches for about 3 seconds, I would like it to be faster.
I would be glad to links to articles or ready-made solutions on this topic.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Immortal_pony, 2018-03-29
@LyoSU

MATCH ... AGAINST

R
Ruslan., 2018-03-29
@LaRN

It is possible to carry out normalization and take out, for example, the artist field in a separate directory, and in the current table, replace it with the artist-a identifier. Then search by artists will be fast from a small number of them compared to compositions, join tables by ID is much faster like. By the title field, you need to search through like, there's nothing you can do about it.

D
Denis, 2018-03-29
@sidni

Some people make a table with keywords like id, keywowds, and the search goes through the keyverds field, and inside there are the main words for which the user is most often searched

R
Roman Mirilaczvili, 2018-03-29
@2ord

The Sphinx search engine can index and quickly search large amounts of information in MySQL and other databases.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question