Skip to:

Buddypress queries doing things “the hard way” (using wrong index)

  • yesbutmaybeno


    I updated my BP from 3.2.0 to the latest version (I don’t think this is the culprit). I transferred servers from A to B, same MariaDB version.

    On both server A (old BP 3.2.0) AND on my local installation (using newest BP), queries run fine.

    On my new server B, some queries (simple ones) are taking 5-7+ seconds (vs 0.002s etc).

    This screenshot sums it up:

    It’s using different indexes on the new server…and as a result, doing things the hard way. I was able to remedy the above query by hacking around and able to grab that particular query via an add_filter("bp_activity_paged_activities_sql") and adding a USE INDEX(date_recorded) into it.

    But many, if not all BP queries, are doing the same thing.
    PS the bp_activity table is identical across all servers I mentioned above, including the indexes.

    Any “easy” solution? It’s killing my server’s performance.

  • You must be logged in to reply to this topic.
Skip to toolbar