我正在为图书馆的搜索框编写一个自动建议,它非常慢。有没有在线工具或者愿意帮我优化的人?
SELECT *,
grbc_books.id book_id
FROM grbc_books
LEFT JOIN grbc_series
ON grbc_books.series_id = grbc_series.id
JOIN grbc_collections
ON grbc_books.collection_id = grbc_collections.id
LEFT JOIN grbc_places
ON grbc_books.place_id = grbc_places.id
RIGHT JOIN grbc_books_subjects
ON grbc_books_subjects.book_id = grbc_books.id
LEFT JOIN grbc_subjects
ON grbc_books_subjects.subject_id = grbc_subjects.id
RIGHT JOIN grbc_books_authors
ON grbc_books_authors.book_id = grbc_books.id
LEFT JOIN grbc_authors
ON grbc_books_authors.author_id = grbc_authors.id
AND ( ( title LIKE "%yea%" )
OR ( subtitle LIKE "%yea%" )
OR ( series LIKE "%yea%" )
OR ( `subject` LIKE "%yea%" )
OR ( `first` LIKE "%yea%" )
OR ( `last` LIKE "%yea%" )
OR ( place LIKE "%yea%" ) )
GROUP BY `title`,
subtitle
ORDER BY title
LIMIT 10;
提前致谢。