Support

Account

Home Forums ACF PRO Repeater fields creating huge database

Solving

Repeater fields creating huge database

  • Hi there,

    We’re using repeater fields in the sense of ‘custom blocks’ that become essentially a page builder. Each block has, besides their default settings, also a cloned ‘advanced settings’ with some margins, paddings, css classes etc.

    This appears to create an individual database entry, even when a field isnt set.

    I just checked, one random page has 688 database records. Our website is relatively complex, but only a couple dozen pages in total. Our database is around 250MB already, with almost a million rows just in post_meta alone. We’re looking at multi-siting it, but i’ll quickly grow to 1GB database.

    Is there a way to deal with this? Is this a problem, or should we ‘simply’ throw more server hardware at it when we run into slow-issues?

  • You are worrying about the wrong things… In your case your only worry should be the amount of time it will take to do database backups and restorations.

    Now, reading from your description of how ACF is been used in your site, all you have to do, is to install a good cache plugin and things will always be fast, no matter how big your database gets, since while your pages are being served on the front end, the data will be coming from static pre-built html pages, and without the need to access the database (technically).

    The issue with big databases that custom fields tend to create, is when (parts of) the data cannot be cached, for example, you have a car dealership website and you want to have an advanced, complex (parametric) search. An example to such search might be to list all cars located in London, are newer than the year 2015, and cost less than 20,000 pounds. In this case, the database has to be used to search for the records, and this is when custom fields will disappoint. And also, this is the exact reason why medium to large e-commerce sites that require such advanced searches will always opt for Magento, etc… over Woocommerce. There are 2 plugins (one free and one premium) that sort of mitigate this database issue, but neither of them support complex fields such as the repeater yet…

    Anyway, in our case however, you will be just fine, have patience with your backups and install a good cache plugin.

  • Cheers NickDA, that put me at ease a little bit.

    Our front-end is really fast and optimised with WP Rocket. Theme, except the database, is very lean as well.

    Couldn’t you create a custom WP json for a search function? I do understand it will slow down the default WP Search, but for us that’s not an issue for this website.

    We’ll keep going this route, perhaps update server when we feel like the DB starts slowing down.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.