• Resolved Paresh Sojitra

    (@pareshsojitra)


    Hi,

    Recently i was monitoring queries. and found there is a problem.

    The problem is 4 queries running at frontend side.
    I think we need to run MySQL Query Only When Required. It fires queries when user in frontend.

    I have added a single piece of code and then the queries was gone. I have added the following code in delete-duplicate-posts.php
    if( !is_admin() ) {
    return;
    }

    Thank you.

Viewing 1 replies (of 1 total)
  • Plugin Author Lars Koudal

    (@lkoudal)

    Hello @pareshsojitra – where did you see the queries in frontend? If you have turned on automatic deletion you could see queries from calls to the wp-cron.php file. That is normal.

    The is_admin() will return true on all ajax calls, so if you are using automatic deletion, this will just prevent the plugin from doing that.

    Please let us know if you can identify the queries from other places in the frontend.

Viewing 1 replies (of 1 total)
  • The topic ‘Problem is related to performance, Run MySql Query Only When Required’ is closed to new replies.