Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5527

xotihcan on "[Plugin: Relevanssi - A Better Search] Slow query"

$
0
0

Hi,
I'm checking the mysql's slow queries log and find a few relevanssi queries.

# Time: 150305 20:09:47
# Query_time: 2.187755  Lock_time: 0.000091 Rows_sent: 0  Rows_examined: 865046
SELECT relevanssi.*, relevanssi.title * 5 + relevanssi.content + relevanssi.comment * 0.75 + relevanssi.tag * 0.75 + relevanssi.link * 0 + relevanssi.author + relevanssi.category * 0.75 + relevanssi.excerpt + relevanssi.taxonomy + relevanssi.customfield + relevanssi.mysqlcolumn AS tf
FROM wp_relevanssi AS relevanssi
WHERE (term LIKE '%locoin' OR term LIKE 'locoin%')   AND ((relevanssi.doc IN (SELECT DISTINCT(posts.ID) FROM wp_posts AS posts WHERE posts.post_type IN ('post', 'page', 'attachment'))) OR (doc = -1))
ORDER BY tf DESC LIMIT 100;

Checking it with EXPLAIN, show that is not using an index.
Screen Grab

Is there anything it can be done to improve it?

Thank you

https://wordpress.org/plugins/relevanssi/


Viewing all articles
Browse latest Browse all 5527

Trending Articles