FWW v2.40 DB Error: Too many tables; MySQL can only use 61 tables in a join

8 Comments

  1. harvey m.
    March 16, 2021 @ 2:55 am

    Additionally the filters do not display on the page (I am using the [fww_sidebar] shortcode, and it worked in the past) unless I go to the FWW settings page and click Save Settings, then it only works on the first page load. after that, the filters won’t load.
    Furthermore, when it actually does load, it loads ALL the filters, even the ones not related to that archive page. This never happened in the past.
    I did try clearing Redis and Nginx cache to no avail.

    Reply

  2. Dave H.
    March 18, 2021 @ 10:16 am

    Ok – for the filters you added, were a lot of them custom taxonomies? Are they hierarchical custom taxonomies?

    72 filters sounds like a LOT! With the way the underlying database is designed, to avoid the 61 table limit I will have to redesign the underlying table structures so that filters can be in a WHERE clause rather than a JOIN clause.

    re: the shortcode bug, thank you for letting me know. I’ve added an item to my bug list here:

    https://trello.com/c/8WXnL17h/132-fww-custom-taxonomy-filter

    Can you tell me what theme you are using too or which builder you are using? I’ll get that installed on my dev environment so I can replicate what you are seeing.

    Even more helpful would be if I could get SFTP and wp-admin access to that site if it’s a dev/test site?

    Reply

    • harvey m.
      March 18, 2021 @ 12:18 pm

      Thanks for your reply Dave!

      Out of all the filters, I have one “Show existing Filters”, one “Product Categories” (hierarchical) and around 70 “Attribute Filters”. I haven’t yet tried the new Custom Taxonomy filters. Also, the ~72 filters aren’t for all categories; Some categories have 10 filters, some 15, etc. but in all there are around 72.

      The site is using Oxygen Builder (which you should add support for, as it’s currently the fastest on the market). In case you didn’t know, Oxygen Builder disables any themes on the site as it is a site builder and not a page builder. (This could be why the styling of the filters is off, like I reported earlier here: https://www.wpintense.com/question/fww-css-issue/). Unfortunately I don’t have a dev server at the moment, but you can spin one up easily here: https://oxygenbuilder.com/try/

      Thanks again for all the work you are putting in!

      Reply

      • harvey m.
        March 18, 2021 @ 12:23 pm

        Also, as for the large amount of filters, maybe it would be more performant to be able to conditionally choose which Product Categories a filter should be visible, rather than switching to a WHERE clause. Would this be better?

        Reply

  3. Dave H.
    March 18, 2021 @ 12:45 pm

    I’ve added some fallback code to beta 2.45 so that it does INNER JOINs for the first 5 attributes that are selected but then reverts to the slower WHERE EXISTS for other attributes after that.

    This should still be very fast since the first 5 INNER JOIN attributes should reduce the result set size that the WHERE EXISTS has to filter across.

    Can you please try installing 2.45 and let me know if that fixes your error?

    Regarding Oxygen Builder – I’d like to add support for this – can you please send me a copy of the plugin and I’ll test it on my local dev? I’ll fix up the default CSS etc too since yes, you are correct, the filters ‘inherit’ whatever your theme has configured for WooCommerce filters, so if that CSS is removed by Oxygen I’ll have to implement some defaults.

    Reply

    • harvey m.
      March 18, 2021 @ 1:09 pm

      I only see the option to download up to beta v2.43

      Was the update pushed?

      Reply

      • Dave H.
        March 18, 2021 @ 1:41 pm

        Oops, sorry, check again now, 2.45 has been pushed.

        Reply

        • harvey m.
          March 19, 2021 @ 12:51 am

          I just tested v2.45 and the issue persists. I am still getting the same error: “Too many tables; MySQL can only use 61 tables in a join”

          Also, now the filters don’t render on the page at all. Only the clear filters button appears.

          Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe!

We publish performance optimisation guides regularly.

Subscribe so you never miss out.

To celebrate our two new hires Glyn & Kerry, we're offering 30% off anything! Coupon: APRIL21

We use cookies

We use cookies for various things on our site, including our on-site chat bubble (if you use it), our comment forms (if you use them) and for session handling (if you log in).

Other than that, we use cookies to identify where traffic came from to help us understand which traffic turns into sales, we use a cookie for Google Analytics traffic analysis and we use a cookie to customise adverts for our own products we think you'll be interested in.

You can read more detail in our privacy policy page. Please click 'Accept' or 'Decline' to continue.