• Resolved domonem

    (@domonem)


    hello,
    I have a question, I use query monitor ad by default Asset clean up uses 17 Queries out of my total 56. how can i reduce those?
    I tried using breeze, cache enabler and some others that didn’t work. However, only swift lite worked and reduced the queries to 10 or 11.
    Can this be worked out? I’d prefer to use breeze but for some reason swift is the only one that reduces the queries made. I tried changing the asset clean up settings, enable/disable jss and css minification and combination but to no avail.
    let me know how to deal with this ??

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Gabe Livan

    (@gabelivan)

    @domonem

    I have a question, I use query monitor ad by default Asset clean up uses 17 Queries out of my total 56. how can i reduce those?
    I tried using breeze, cache enabler and some others that didn’t work.

    Can you let me know the queries that you’ve noticed Asset CleanUp triggers? Breeze, Cache Enabler and WP Rocket are not designed to reduce the number of queries as the SQL queries are needed to retrieve information and if the page is cached and fetched from an HTML file, no connection to the database should be made. These queries are triggering for non-cached pages only. The more information you can provide me with those queries, the better I can assist you. If there’s anything redundant, I’ll make sure it will get better in the next version of Asset CleanUp.

    Can this be worked out? I’d prefer to use breeze but for some reason swift is the only one that reduces the queries made. I tried changing the asset clean up settings, enable/disable jss and css minification and combination but to no avail.

    There are queries that are triggering no matter what settings you have set there. They have to run in order to provide a good functionality of the plugin. As I mentioned in the previous comment, I’d like to know those queries that are reported. I know which ones are triggering for every website. Since each page is unique and might trigger a query that is not triggering anywhere else, I’d like to take a look at all of them that are running on your website.

    Thread Starter domonem

    (@domonem)

    hello
    thanks for the fast reply.
    All the 17 queries are to do 1 thing “get_option()” and each of them uses these parameters:

    SELECT option_value
    FROM wp_options
    WHERE option_name = 'X'  --> only this is unique for each of the 17 queries.
    LIMIT 1

    I can show you some screen shots if you want or let me know what you need.
    example: here or here

    Since they’re all using the same table, can’t we make it so that 1 request is made to get all the option_values?
    thanks!

    • This reply was modified 5 years ago by domonem.
    • This reply was modified 5 years ago by domonem.
    Thread Starter domonem

    (@domonem)

    by the way, these queries are shown while viewing the front end.

    Thread Starter domonem

    (@domonem)

    so what do you think? ??

    Thread Starter domonem

    (@domonem)

    okay so I tried the new update and it seems to have increased the # of queries from 17 to 27. I did some testing and it appears that 5 of these queries are constant no matter what, and the rest is all due to css and js minification and combination. But all of them use the same table and try to get option value for some option.
    Can’t all these option values be fetched by 1 request?

    Plugin Author Gabe Livan

    (@gabelivan)

    @domonem when you view the front-end, are you logged-in and have “Manage in the front-end?” enabled? These queries are triggered by get_option() WordPress function which is used several times throughout the plugin. The cached pages (e.g. via WP Rocket) will never trigger get_option() since they are read as static files from the caching (no database queries are made at all).

    With get_option(), a core WordPress function, it’s easier and the recommended way to get information from the wp_options (or whatever prefix you set) table. Developers can attach hooks to it and so on. Combining all of them into one (due to the plugin’s architecture) is not a feasible option at least at this time. What I could do is reduce them if there are redundant ones.

    Since these queries are triggering for non-cached pages (e.g. when you or other users are logged-in), what’s the biggest worry you have about them? Do you have lots of traffic from your logged-in users?

    Let me know when you can get back to me regarding these questions at your earliest convenience!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘17 Queries made’ is closed to new replies.