• Hello, I have a problem about mysql slow query. it takes a lot of time

    # Query_time: 56.345844
    # Query_time: 53.457524
    # Query_time: 56.088079
    # Query_time: 59.375900

    SELECT COUNT(DISTINCT(relevanssi.doc)) FROM hc1heex_relevanssi AS relevanssi
                             WHERE  relevanssi.term = relevanssi.term   AND (
                            relevanssi.doc IN (
                                    SELECT DISTINCT(posts.ID) FROM hc1heex_posts AS posts
                                    WHERE posts.post_type IN ('post', 'snax_quiz', 'snax_poll', 'snax_item')
                            )
                    );

    how can u help to resolve this select problem

    • This topic was modified 3 years, 2 months ago by sarse92.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mikko Saari

    (@msaari)

    You’re running a search without a search term here, and for some reason the usual limit to 500 posts is disabled. There’s no way around that; that’s going to be a slow query, especially if your site is large.

    How about disabling Relevanssi and using the plain WP_Query for these termless searches? WP_Query might be faster.

    Thread Starter sarse92

    (@sarse92)

    Its directly WP_Query used. I runned on server Query log and it returned that times which I wrote in comment.

    I don’t know where this query is running. I’m using bimber template and can u help what to do ? how to figure out this feature?

    Thread Starter sarse92

    (@sarse92)

    I dont understood when this query is running.

    Plugin Author Mikko Saari

    (@msaari)

    I don’t know what Bimber is, so I can’t help with that. I don’t know where this query is running, either. If I try to search without a search term on your site, I just get a quick “no results found”, which is good. So perhaps this is not a big problem? Or do you get a lot of these queries?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘RelevanSSI MySQL Slow Query Log’ is closed to new replies.