• Resolved floordesign

    (@floordesign)


    I’ve inserted 6000 listings using CSV import (I’ve defined about 8 fields for each listing) and 46 categories.
    Category pages are loading very slow and I think it’s a MySQL query problem.

    Take a look on the following log (from MySQL slow query log) for a category page query. (Rows_examined: 36644164 !!! and 44 seconds)

    # Query_time: 44  Lock_time: 0  Rows_sent: 5863  Rows_examined: 36644164
    SELECT DISTINCT listing_id FROM wp_wpbdp_listing_fees WHERE listing_id
     NOT IN (SELECT listing_id FROM wp_wpbdp_listing_fees WHERE category_id
     IN (19) AND (expires_on IS NULL OR expires_on >= '2012-12-03 20:48:33'));

    Please check this problem and send a feedback.
    Thanks a lot.

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

    (@businessdirectoryplugin)

    Hi floordesign,

    Sorry to hear that you ran into this. We’ll look into it. It would help if we could get a copy of the CSV file you used to help reproduce the problem more quickly. Can you send it via the contact form? https://businessdirectoryplugin.com/contact/

    Please link to this forum post for context.

    Plugin Author Business Directory Plugin

    (@businessdirectoryplugin)

    Hi Florin,

    So, we’ve looked at this and we have a solution but it will have to wait for the next release. It’s not easy to patch.

    In the meantime, you can get around the performance issue with this hack:

    Change the body of get_expired_listings() inside listings.php (line 313) so it ends up just like this:

    public function get_expired_listings($category_id, $include_subcategories=true) {
    return array();
    }

    The results will not be as accurate (you’ll see some expired listings, but not all), but it will handle the performance problem for now. Full solution coming in the next release.

    Thread Starter floordesign

    (@floordesign)

    I’ve modified the /api/listings.php as you mentioned but it didn’t boost the page loading.
    The slow query looks like earlier…

    # Query_time: 36  Lock_time: 0  Rows_sent: 6015  Rows_examined: 37300096
    SELECT DISTINCT listing_id FROM wp_wpbdp_listing_fees WHERE listing_id NOT IN (SELECT listing_id FROM wp_wpbdp_listing_fees WHERE category_id IN (11) AND (expires_on IS NULL OR expires_on >= '2012-12-10 17:52:36'));

    Thanks for your support. I’ll wait for your update.

    My business Directory plug-in is causing my site to slow down quite a bit. I isolated what is slowing down my site to a crawl and that’s the plugin that’s locking it up. I really need to keep it up because of advertisers so I need some advise as to what to do. Can anyone help?

    Plugin Author Business Directory Plugin

    (@businessdirectoryplugin)

    Hi flgirl,

    We have added a number of performance enhancements to the next version and several testers have reported marked increase in speed after using that upgrade. You can try the beta now or wait until it releases next week. Contact me if you want to go with the beta. https://businessdirectoryplugin.com/contact/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Category page slow loading problem’ is closed to new replies.