Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter illiniguy

    (@illiniguy)

    Thanks for the reply. Is there a reason you don’t bump the version number to 1.3.2, etc.? That’d make it much easier to know when there are updates or which version we have. Especially as I know you’re making a lot of tweaks. I know the number may get weird (1.3.25…) but I’d personally rather have that.

    Thread Starter illiniguy

    (@illiniguy)

    So my apologies, it looks like you are looking to keep multiple entries per users. That’d make sense for ‘most users ever’ etc. I’m still looking at why performance was going downhill. I’ll let you know if I find a cause or solution.

    UPDATE: Here’s a version of the query that runs much faster. .03 sec vs 1.2 sec in my setup. I switched the IN clause to an INNER JOIN. And also removed what looked like a duplicate WHERE clause based on the date calculation.

    Note I still get dupes for one user who has 3 records with same timestamp. Normally you can avoid that by doing a GROUP BY on this entire query but you’re also returning the ‘id’ of the record so the grouping wouldn’t work. If you can’t remove ‘id’ from this query you may want to add a uniqueness filter in code before display.

    SELECT p.date_recorded as date_recorded, p.id, p.userid, p.status,
    w.user_nicename, w.user_login, w.display_name
    FROM wp_bbpas AS p
    INNER JOIN wp_users AS w ON w.id = p.userid
    INNER JOIN (
    	SELECT userid, MAX(date_recorded) as dater
    	FROM wp_bbpas
    	WHERE date_recorded >= NOW() - INTERVAL 24 HOUR
    	GROUP BY userid ) AS subq ON subq.userid = p.userid AND subq.dater = p.date_recorded
    ORDER BY date_recorded DESC
    Thread Starter illiniguy

    (@illiniguy)

    FYI I had to deactivate the plugin again. The 24 hour query was starting to impact performance too much.

    I also had to create the table manually.

    After installing 1.3.1 via ‘Add New’ in WP I get a similar error on activation.

    Object Moved
    This document may be found here
    Could not migrate data. Table ‘hrlmb.wp_bbpas’ doesn’t exist

Viewing 5 replies - 1 through 5 (of 5 total)