• Resolved kimarkf01

    (@kimarkf01)


    My site suddenly got too slowed and my host checked what happened and heres what they found.

    Query
    Execution Time (in sec)
    DELETE lm FROM wp_gamipress_logs_meta lm LEFT JOIN wp_gamipress_logs l ON l.log_id = lm.log_id WHERE l.log_id IS NULL;
    323
    SELECT DISTINCT meta_key FROM wp_postmeta WHERE meta_key NOT BETWEEN ‘_’ AND ‘_z’ HAVING meta_key NOT LIKE ‘\\_%’ ORDER BY meta_key LIMIT 30;
    14
    SELECT option_value FROM wp_options WHERE option_name = ‘woocommerce_updated_instance_ids’ LIMIT 1;
    13
    SELECT type, COUNT( * ) AS num_entries FROM wp_gamipress_logs GROUP BY type;
    13
    SELECT t.type FROM wp_automatorwp_triggers AS t GROUP BY t.type;
    9
    SELECT l.* FROM wp_gamipress_logs AS l LEFT JOIN wp_gamipress_logs_meta AS lm0 ON ( l.log_id = lm0.log_id AND lm0.meta_key = ‘_gamipress_post_id’ ) WHERE ( l.user_id = ‘18909’ ) AND ( l.type = ‘time_based_reward’ ) AND ( lm0.meta_value = ‘1613’ ) ORDER BY l.date DESC LIMIT 1;
    9
    SELECT post_type, COUNT( * ) AS num_entries FROM wp_gamipress_user_earnings GROUP BY post_type;
    8
    SET SESSION sql_mode=’NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION’;
    7
    SELECT l.* FROM wp_gamipress_logs AS l LEFT JOIN wp_gamipress_logs_meta AS lm0 ON ( l.log_id = lm0.log_id AND lm0.meta_key = ‘_gamipress_post_id’ ) WHERE ( l.user_id = ‘18914’ ) AND ( l.type = ‘time_based_reward’ ) AND ( lm0.meta_value = ‘1613’ ) ORDER BY l.date DESC LIMIT 1;
    7
    SELECT option_value FROM wp_options WHERE option_name = ‘woocommerce_force_ssl_checkout’ LIMIT 1;
    7`

    They told me that you need to optimize this.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Ruben Garcia

    (@rubengc)

    Hi @kimarkf01

    This database query is only executed in 2 situations:
    1) When you delete a user (to delete all its logs and any orphaned meta)
    2) When you perform a logs clean up

    As you can see, both cases are not common to happen since both only happens by the manual intervention of an administrator so the slow down from your site comes from another thing

    Hope it helps!

    Thread Starter kimarkf01

    (@kimarkf01)

    I disabled GamiPress and my site load went to normal. I’m using the latest version of GamiPress.

    Plugin Author Ruben Garcia

    (@rubengc)

    Hi @kimarkf01

    Is possible that GamiPress can slow down some process if you have configured several awards.

    For example, the LearnDash integration includes several events based on the quiz completion (if a user completes it, if pass or fails, if a user has completed it with a minimum grade, etc).

    If you configure 20 requirements (points awards, deducts, steps, and rank requirements) it could make the process slow down since GamiPress needs to check if a user is able to earn all of them and also if the user should earn something more (like an extra achievement, or award extra points for something, etc).

    For that, the way you can speed up some process is by reducing the number of requirements that are using this event (for example, if you have 20 achievements looking for the same event, reduce them to 10).

    The GamiPress awards engine is developed to run as fast as possible but is comprehensible that will run slower if is required to perform several checks on a single action.

    There are some improvements you can apply to your database and server but these recommendations are outside the GamiPress support since they are related more to server management and improvement than to GamiPress.

    Please, make them on a staging site first and always consult them to your hosting provider first:

    1) Turn to InnoDB all your WordPress tables, posts, post meta, users, user meta, and GamiPress ones through the SQL function ALTER TABLE my_table ENGINE = InnoDB;

    2) Clean up GamiPress “Event Trigger” logs from GamiPress -> Tools -> General -> Clean-Up Logs Tool.

    3) Remove the GamiPress points awards or achievements and ranks requirements you don’t truly need (to reduce the number of awards).

    4) Enable Memcached on your server (talk with your hosting team support).

    5) Add indexes to your database tables (commonly to the “id” like fields) (talk with your hosting team support).

    6) Optimize tables through the “OPTIMIZE TABLE my_table” SQL function (talk with your hosting team support).

    Important: Turn to InnoDB will speed up a lot all your site because every database table turned to InnoDB will be much faster, also, is completely safe turn WordPress posts, post meta, users, and usermeta tables to InnoDB.

    Thread Starter kimarkf01

    (@kimarkf01)

    Resolved! AutomatorWP causing the issue. I deleted all automation and created again.

    Plugin Contributor Paco González Pérez

    (@pacogon)

    Hi @kimarkf01 !

    Glad to hear you have it figured out. ??

    Hope it helps!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Slows down my site’ is closed to new replies.