Support » Plugin: WP Extended Search » Search extremely slow using only 1 Meta Key Names

  • Hello

    I’m using this search option of “Meta Key Names”, selecting only 1 field: https://i.imgur.com/9udUz5g.png

    But after ativating it, the search is EXTREMELY slow. Why is this happening? And if I desactivate the plugin, the search is back to normal.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Sumit Singh

    (@5um17)

    Hi,

    It could be because of huge database.
    Can you please share the number of rows in _posts and _postmeta table?

    Thanks

    Thread Starter biqu3

    (@biqu3)

    @5um17

    # Table: wp_posts
    # Approximate rows expected in table: 7291

    # Table: wp_postmeta
    # Approximate rows expected in table: 345851

    And I’m adding more and more articles… what is the solution?

    Thread Starter biqu3

    (@biqu3)

    @5um17 Can you please check this? I can give you my email and we can discuss there.

    Thread Starter biqu3

    (@biqu3)

    @5um17 5um17 Can you please check this? I can give you my email and we can discuss there.

    Plugin Author Sumit Singh

    (@5um17)

    Hi,

    Sorry for the delay. The problem is not article the problem is post meta table.
    You have nearly 350000 records in post meta table. WPES join this table and then search which means it is searching in 350000 rows.

    I would suggest you to upgrade hosting like dedicated host and clean post meta table https://wordpress.org/plugins/advanced-database-cleaner/

    I tested on the site with 40k posts and 540k post meta rows. The results has difference with post meta setting turned off search finished in 3 seconds with post meta setting turned on the search finished in 5.5 seconds. But this is reasonable because we are searching in huge post meta table and this will take some time.

    You can also try Database Caching so that frequently search terms will be cached.

    Hope it helps.
    Thanks

    Thread Starter biqu3

    (@biqu3)

    @5um17 thanks for you help.

    I use WP Optimize and Advanced Database Cleaner, but still the search is super slow…

    I can’t understand why, if it is only searching in 2 fields “Search in Title” and 1 Meta Key Names “original title”. I will not upgrade to dedi server just because of the search, dedi server is very expensive and my website dont have much traffic so doesnt need dedi server just for speed up the search.

    Why does it search in ALL rows of wp_postmeta and not only the “original title”?

    • This reply was modified 1 month, 1 week ago by biqu3.
    Plugin Author Sumit Singh

    (@5um17)

    Hi,

    It is is searching just in “original title” key not the all keys but to find this key MySQL need to look for some records. This is how DB works https://www.percona.com/blog/2006/06/09/why-mysql-could-be-slow-with-large-tables/

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.