• Resolved Harun

    (@harkotr)


    I changed servers, I made performance settings for the database, but I could not get a good result. One of the servers I used had 64GB ram. When I increase the database cache size, the previous queries are instantaneous, but the average wait time is 1 minute when a new query is made.

    I tried with the simplest themes, I wonder if the theme I’m using is causing problems, but it still didn’t work. After about 100k job postings in the database, searches become a serious problem.

    I also changed the LIKE % expressions in the inclusion search query to equals. Again no results. I’ve also tested with custom search plugins on a few different servers, but no results. I couldn’t find a way to speed up queries. Do you have any suggestion about it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Harun,

    Thanks for reaching out. We need some more information about your website’s set up to help with the issue.

    1. Share a list of all the plugins installed on your website.
    2. Does the issue happen with only the WP Job manager installed & using Twenty Twenty One theme?
    3. Do the queries run okay when only the WP Job manager & Twenty Twenty One theme are active on the site?
    4. Share the versions of PHP / WordPress / WP Job Manager installed on your site
    5. Where are you running the search on your website? Frontend or WordPress Admin?

    `

    Best,

    Thread Starter Harun

    (@harkotr)

    Hi Gaurav;
    Thanks for your interest.

    My test system doesnt have any special plugin or theme (but live system has lots of required). Both systems search at about the same speed.

    I wanted to add limit to SQL query but without success. For example, if there is a way to stop the query and show the results after the first 100 records found, the problem is solved. However, I’m rusty about sql, I couldn’t figure it out.

    1. Test system only default wp theme and Wp Job manager
    2. Nothing changes just when they are there, it takes an average of 40 seconds in the chrome developer panel
    3. I tested php 7.3 , 7.4, 8.0 and 8.1
    4. The frontend or backend is the same. The backend query is not so important as it is the visitors that are important to me.

    _posts table has 228403 record now. Problem occur after 110k .
    Is there any way limit the search query?Thanks

    Hello Harun,

    have you discovered which query is responsible for the delay? If not I would suggest using a plugin like Query Monitor to find it.

    Query Monitor has a caller field that will help you find which code path triggers the query. After that you will be able to try different approaches in optimizing the query like implementing some form of pagination as you suggested or adding a database index.

    Hope that helps,
    Giannis

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Very slow search’ is closed to new replies.