• Resolved Alexander Guskov

    (@forcesail)


    Hello,

    I use this plugin more that 10 years with thanks thoughts to you.

    But there is one issue is poisoning this amazing plugin: in MetaSlider->get_slides() it construct very unoptimized SQL SELECT request with a lot of unnecessary LEFT JOINS (which are not used in WHERE clause) so the MariaDB needs 0.17s for response (other selects takes < 0.01s) on a very small DB. It’s 15% of complete HTTP Server Response Time that is too much.

    It seriously impact on performance of sites. Please, optimize it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author htmgarcia

    (@htmgarcia)

    Hi @forcesail,

    we appreciate your feedback! May I have more details just to be sure we’re looking at the same instance of get_slides() due we have 2 functions with the same name.

    Regards

    Plugin Author htmgarcia

    (@htmgarcia)

    Sorry, I just noticed you mean the method from MetaSlider class, not from MetaSlider_Admin_Table.

    We use WP_Query to build the database query, so there could be limitations in how much we can modify the end result.

    When you mention other selects taking < 0.01s, which ones do you mean? If belongs to another plugin, please let us know to see if worth to consider another approach for database queries.

    Regards

    Thread Starter Alexander Guskov

    (@forcesail)

    Hi,

    here is screenshot from query_monitor plugin rearing the issue:
    https://forcesail.ru/files/2402021.jpg

    here are the list of the most long responding other requests (except your plugin), just to estimate how promt DB works:
    https://forcesail.ru/files/2402022.jpg

    So, the difference between the your plugin response time and the next the most long working selects (3 ones) is 10 times, and between others are 100 times. It’s too much.

    I haven’t looked inside your plugin but I guest that you pass wp_query empty parameters too. Unfortunately, wp core don’t optimize parameters in wp_query and create SELECT like all parameters of wp_query are valuable (not nulls or empty strings). So it create select with a lot of unnecessary left joins.
    If it so, there are 2 ways to optimize it is to fill wp_query (probably in wp_posts()) only with valuable parameters or create SELECT by yourself (that is much better)

    Sorry for the suggestions. Just hope to help you to make the plugin even better.

    Plugin Author htmgarcia

    (@htmgarcia)

    Thanks for sharing more details!

    I’m getting lower values in my end (but using MySQL), however the slideshow settings could impact the result. Is possible for you to send us the exported slideshow from your screenshot? Please send us a message to help [at] metaslider.com – Include the URL of this forum topic as reference

    Regards

    Thread Starter Alexander Guskov

    (@forcesail)

    Hi,
    have sent.

    The others slideshows show the similar delays.

    Plugin Author Steve Burge

    (@stevejburge)

    Thanks so much for your help on this @forcesail. We’ll follow up with this by email. And if there are code changes, we’ll post back here for others to see.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Very slow SQL-select in MetaSlider->get_slides()’ is closed to new replies.