Support » Plugin: BP Better Messages » Thousands of MySql queries

  • tatiana_k

    (@tatiana_k)


    I use Query Monitor plugin to check the MySql queries on every page.
    It shows 67 queries without BP Better Messages plugin and 2930 (!) queries with it.

    I have many messages, maybe a thousand or more, and maybe your plugin is generating 2-3 queries for each of them, not only the most recent ones. ((

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author wordplus

    (@wordplus)

    Hi there!

    Shouldnt be like that, does it slow down website?

    Thanks!

    tatiana_k

    (@tatiana_k)

    Not greatly, but I test it on a replica of my site where I’m the only visitor. Thousands real visitors who message simultaneously may change the speed dramatically.
    I’ve found two types of queries so far, about 1300-1400 each.

    One is to get users (I guess all users that ever wrote me a message, because users with small ids have already been absent for a long time).

    Total: 1407 / 2934
    examples:

    SELECT *
    FROM club__users
    WHERE ID = ’17’
    LIMIT 1
    0,0001

    SELECT *
    FROM club__users
    WHERE ID = ‘5’
    LIMIT 1
    0,0004

    The other type is to select their meta:
    Total: 1425 / 2934

    SELECT user_id, meta_key, meta_value
    FROM club__usermeta
    WHERE user_id IN (5)
    ORDER BY umeta_id ASC +
    0,0009

    SELECT user_id, meta_key, meta_value
    FROM club__usermeta
    WHERE user_id IN (3)
    ORDER BY umeta_id ASC
    0,0004

    All messages list or one message thread make no difference.

    Plugin Author wordplus

    (@wordplus)

    do you see where its coming from? which function?

    tatiana_k

    (@tatiana_k)

    No, I don’t see where it’s coming from, I only see the result. I hoped you’d know. ))

    Plugin Author wordplus

    (@wordplus)

    create support ticket inside plugin menu please

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.