Answer the question
In order to leave comments, you need to log in
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
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.
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
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 questionAsk a Question
731 491 924 answers to any question