Support » Plugin: Index WP Users For Speed » How to test if Index rebuilding process have actually stared?

  • Resolved Jaro

    (@pixtweaks)


    Hello,
    I’ve installed the plugin on the staging site that is not publicly accessed. I’ve activated this plugin and selected “immediately, then daily” option and saved the changes. After page reload there was a notice “Index rebuilding process starting”, but I can’t see any activity and doesn’t seems it’s doing anything.
    I tried to run query “SELECT * FROM wp_usermeta WHERE meta_key = ‘wp_index_wp_users_for_speed_role_author’;” to see if these meta keays been created but no luck. The same thing happened on my local WP.

    My first question is, the way I’ve tested it is correct?
    And second, the site to run indexing has to be public? Can I trigger building indexes manually on the local WP?

    Thank you very much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Jaro

    (@pixtweaks)

    I just found in debug.log this DB error

    It’s a long query, starting:

    Lock wait timeout exceeded; try restarting transaction. Konkrétní dotaz: INSERT INTO wp_usermeta (user_id, meta_key) SELECT user_id, meta_key FROM (SELECT a.user_id, 'wp_iufsr:administrator' meta_key
             FROM wp_usermeta a
             LEFT JOIN wp_usermeta b
                    ON a.user_id = b.user_id 
                   AND b.meta_key = 'wp_iufsr:administrator'
            WHERE a.meta_key = 'wp_capabilities'

    And finishing with:
    WHERE a.meta_key = ‘wp_capabilities’
    AND a.meta_value LIKE CONCAT(‘%’, ‘advanced\\_ads\\_user’, ‘%’)
    AND b.user_id IS NULL) a WHERE a.user_id >= 5999 AND a.user_id < 7999. Příslušná funkce: do_action_ref_array(‘index_wp_users_for_speed_task’), WP_Hook->do_action, WP_Hook->apply_filters, IndexWpUsersForSpeed\index_wp_users_for_speed_do_task, IndexWpUsersForSpeed\Task->doTaskStep, IndexWpUsersForSpeed\PopulateMetaIndexRoles->doChunk.

    Plugin Author OllieJones

    (@olliejones)

    A lock timeout! The plugin should recover, but it may take some time. I’ll check this out. Thanks for letting me know.

    To check whether the metadata indexing is complete, try this.

    SELECT MAX(user_id), meta_key
    FROM wp_postmeta
    WHERE meta_key LIKE ‘wp_iufsr%’
    GROUP BY meta_key

    This will give you the largest user id with the prefix index for each role (administrator, etc). When indexing is complete all users will have a metadata item like this.

    Thread Starter Jaro

    (@pixtweaks)

    Hi, I ran this query but there is an error #1054 – Unknown column ‘user_id’ in ‘field list’
    Simplified query SELECT * FROM wp_postmeta WHERE meta_key LIKE ‘wp_iufsr%’ doesn’t show any match. I think in my case it never ran.

    Thank you!

    Plugin Author OllieJones

    (@olliejones)

    Ooops, sorry, I made a mistake, I should have mentioned wp_usermeta.

    This is the correct query.

    SELECT MAX(user_id), meta_key
    FROM wp_usermeta
    WHERE meta_key LIKE ‘wp_iufsr%’
    GROUP BY meta_key

    Thread Starter Jaro

    (@pixtweaks)

    thank you very much, this is working now and the plugin did user indexes. Time to test it.

    Plugin Author OllieJones

    (@olliejones)

    Glad to hear it works for you.

    To a future release I’lll add a feature to show the status.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to test if Index rebuilding process have actually stared?’ is closed to new replies.