Skip to:
Content
Pages
Categories
Search
Top
Bottom

Cache problem ?

  • Avatar of elpix
    elpix
    Participant

    @elpix

    Hi all,

    I ask your help beacause I’ve already tried everything that I knew before to make a query work in few seconds

    I’m on BP 1.5.5/

    Before, everything was working well, but one day, access to our forum became very very long (170 s average).
    After many tests, I think that it’s a cache problem.

    Here is two queries that make me think that :

    `SELECT t.*, g.id AS object_id, g.name AS object_name, g.slug AS object_slug
    FROM wp_bb_topics AS t
    INNER JOIN wp_bb_posts p ON p.topic_id=t.topic_id AND p.post_time=t.topic_start_time
    JOIN wp_bp_groups AS g
    LEFT JOIN wp_bp_groups_groupmeta AS gm ON g.id = gm.group_id
    WHERE (gm.meta_key = ‘forum_id’ AND gm.meta_value = t.forum_id) AND g.STATUS = ‘public’ AND t.topic_status = ’0′
    ORDER BY t.topic_time
    LIMIT 20`

    And the same without the “LIMIT”

    `SELECT t.*, g.id AS object_id, g.name AS object_name, g.slug AS object_slug
    FROM wp_bb_topics AS t
    INNER JOIN wp_bb_posts p ON p.topic_id=t.topic_id AND p.post_time=t.topic_start_time
    JOIN wp_bp_groups AS g
    LEFT JOIN wp_bp_groups_groupmeta AS gm ON g.id = gm.group_id
    WHERE (gm.meta_key = ‘forum_id’ AND gm.meta_value = t.forum_id) AND g.STATUS = ‘public’ AND t.topic_status = ’0′
    ORDER BY t.topic_time`

    The first (with LIMIT) take 150 secondes (At the beginning, it was working well).
    But the second (without LIMIT) takes 1.5 secones !!!!

    When I’m in PHPmyADMIN, the “show full processlist” tell “copy to tmp table” during the 150 secondes.

    So my question is :
    Is there a cache limit I’ve reache with my DB (20.000 topics) ?
    Where I’ve to modified (I think in my.cnf), and what is the value to put (I’ve make a lot of test, without good results)?

    Thank you very much !

    Bye

Viewing 2 replies - 1 through 2 (of 2 total)
  • Avatar of elpix
    elpix
    Participant

    @elpix

    No one have an idea ? :(

    Avatar of shanebp
    shanebp
    Moderator

    @shanebp

    imo – it’s not about cache, it’s about the available memory on your server and various mysql settings. You don’t want to cache forum calls anyways.

    BP 1.7 is addressing some of its’ long queries.
    Perhaps BB is also interested – you should post your question and research on http://bbpress.org/forums/

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

You must be logged in to reply to this topic.