• Hi Gioni,

    for development for my own plugin I’m using Query Monitor. It also shows duplicate queries and there are some in your plugin. Are they really necessary?

    Here the output of Query Monitor on my blogs homepage/startpage:

    Duplicate Queries

    Query

    SELECT tag
    FROM cerber_acl
    WHERE ip_long_begin <= XXXXXXXXXX
    AND XXXXXXXXXX <= ip_long_end

    Count
    3
    Callers
    cerber_acl_check()
    3 calls
    Components
    Plugin: wp-cerber
    3 calls
    Potential Troublemakers
    WP_Cerber->__construct()
    1 call
    cerber_is_allowed()
    1 call
    cerber_access_control()
    1 call

    Query

    SELECT count(ip)
    FROM cerber_blocks
    WHERE ip = "XXX.XXX.XXX.XXX"
    OR ip = "XXX.XXX.XXX.*"

    Count
    2
    Callers
    cerber_block_check()
    2 calls
    Components
    Plugin: wp-cerber
    2 calls
    Potential Troublemakers
    cerber_is_allowed()
    1 call
    cerber_access_control()
    1 call

    Bye,
    Andreas

Viewing 1 replies (of 1 total)
  • Plugin Author gioni

    (@gioni)

    Hi!

    Absolutely. And that’s OK. You shouldn’t be concerned about that because it doesn’t affect the performance of a website due to highly optimized tables and queries. Don’t forget about DB caching engine. It works very well for duplicate queries like those.

    Trying to avoid tiny duplicate queries is called micro-optimization. We need to be focused on real troublemakers, security issues etc.

Viewing 1 replies (of 1 total)
  • The topic ‘Duplicate Queries’ is closed to new replies.