Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Business Directory Plugin

    (@businessdirectoryplugin)

    Hi Josef,

    Sorry that you ran into issues here!

    We did make some changes for 4.0, but they would not have increased the number of queries for most things by 3.5x. I think we need to understand this a bit more here.

    Is the only thing you changed the version of BD?

    What specific queries are you referring to here?

    What plugin are you using to check this?

    Which page(s) are you checking against?

    Are you seeing actual performance problems or is this just something you noticed?

    Please let me know.

    Thread Starter Josef Zacek

    (@josef-zacek)

    I’m using

    get_num_queries(); function to monitor database query.

    https://codex.www.ads-software.com/Function_Reference/get_num_queries

    Plugin Author Business Directory Plugin

    (@businessdirectoryplugin)

    Hi Josef,

    What about my other questions? Can you please let me know?

    How are you injecting this WordPress API call into things?

    Thread Starter Josef Zacek

    (@josef-zacek)

    Is the only thing you changed the version of BD? => yes

    What specific queries are you referring to here? => up from 69 to 230 according to https://codex.www.ads-software.com/Function_Reference/get_num_queries

    What plugin are you using to check this? => none, I have <?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?> seconds. in header.php file

    Which page(s) are you checking against? => main page which is listing all business listings (10 per page and paginated)

    Plugin Author Business Directory Plugin

    (@businessdirectoryplugin)

    Let me check with my developer…

    Plugin Author Business Directory Plugin

    (@businessdirectoryplugin)

    Hi Josef,

    OK, we setup two test sites and ran the same checks you described above…we don’t see the same results, unfortunately. Here’s what my developer said:

    My test setup has 2 listings and 14 form fields. I used Query Monitor and obtained the following results:
    
    View	Core Version	SELECT queries	UPDATE queries	SHOW queries
    Main page (with listings)	3.7.5	75	1	2
    View Listings	3.7.5	65	1	2
    Main page (with listings)	master	76	0	0
    View Listings	4.1RC12	66	0	0
    My findings are that things are basically the same. In fact, 4.x doesn't do the per-page UPDATE and 2 SHOW lookups that 3.7.x executed, which is better for performance.
    
    That makes sense since I don't recall modifying database code this way during development of 4.0. Something else might be at play here. Another plugin or theme, or an object caching system, something...
    
    4.x does modify how we integrate to the main query, so that might be triggering a different behavior from other plugin or even the theme... but queries directly executed by BD should be basically the same in 3.x and 4.x.

    Can you please try a conflict test and see if the queries are affected by having certain plugins or your theme active?

    Here is an article about how to test for theme and plugin conflicts with Business Directory, which may help pinpoint the issue: https://businessdirectoryplugin.com/support-forum/faq/how-to-check-for-plugin-and-theme-conflicts-with-bd/

    Please let me know.

    Thread Starter Josef Zacek

    (@josef-zacek)

    thanks for reply, I’l check https://businessdirectoryplugin.com/support-forum/faq/how-to-check-for-plugin-and-theme-conflicts-with-bd/ link

    What numbers you get with WP build in function please?
    <?php echo get_num_queries(); ?> queries in <?php timer_stop(1); ?>

    Plugin Author Business Directory Plugin

    (@businessdirectoryplugin)

    Perhaps the easier question to answer would be what you see with Query Monitor, which is a pretty reliable plugin to check SQL queries. I haven’t found that modifying the code is required to see what is queried and Query Monitor does a good job intercepting things. The end result ought to be similar. Can you try that and see what you find?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Number of queries went up from 69 to 230’ is closed to new replies.