• Resolved metate

    (@metate)


    Hi Anmari,
    Our site has been running slow and we’ve been having database connection issues. I put in a ticket to our hosting company and they responded with the message below. Can you let me know if this is something that could be changed??? (Or if you need more info, what I need to ask my hosting company for??)
    Thank you!

    Thank you for contacting HostGator. One of your plugins, amr-users, runs the following query when trying to determine the user fields in WordPress:

    SELECT DISTINCT(COLUMN_NAME) FROM information_schema.COLUMNS WHERE TABLE_NAME = “wp_users”;

    Lavender’s mysql process has been killed 57 times in the past 24 hours while it was running this query. This query is especially discouraged on Shared servers with over thousands of other users and databases in mysql. Essentially it has to go over all the permissions for your user against the other users databases. This can take minutes to complete. We recommend that you talk to the developer of this plugin about changing their code to something less intensive.

    More information about this can be found at the following link:
    http://dev.mysql.com/doc/refman/5.5/en/information-schema-optimization.html

    There is a way to mitigate this query and make it run in a shorter amount of time, but know that it is still highly discouraged. You can add “table_schema=”lavender_wrdp1″ and” after the “WHERE” and it will start in your WordPress database’s schema. The new query would look like:

    SELECT DISTINCT(COLUMN_NAME) FROM information_schema.COLUMNS WHERE table_schema=”lavender_wrdp1″ and TABLE_NAME = “wp_users”;

    http://wordpress.org/plugins/amr-users/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author anmari

    (@anmari)

    Hi thanks for flagging.

    Code executes when wp version greater than 3.3 in case wp added more fields to user master. NOT essential and in view of the above, I will change the plugin to not have that check.

    Quick Fix for you is in file ameta-includes
    function amr_get_usermasterfieds

    comment out line 187

    if (version_compare($wp_version,'3.3','<')) {

    and line 199 and
    and lines 200 to 210 (the whole of the else paragraph)

    Interesting that this is the first time it’s been flagged.

    Plugin Author anmari

    (@anmari)

    see 3.6.6 update

    Thread Starter metate

    (@metate)

    Yep, that did it – updated on our test site and live site and it’s MUCH better. Thank you for 1) listening and 2) reacting so quickly!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘query causing slow site/db connection issues??’ is closed to new replies.