Home Forums General Issues Database content – is it normal?


Database content – is it normal?

  • Hey All!
    I’m just trying to determine if what I’m seeing take place in my db is normal for ACF.

    I have a completely empty database. I created a custom field group “custom fields” and then create 8 custom fields within that group. 5 are number types and 3 are text.

    Location rules are set to “show this field group of post type is equal to post”.

    I did not make any other changes.

    Then I created a test post with a title “Test Post” and with the word “test” in the body of the post then I populated each of the 8 custom fields with just the number “50” – so I could see how it all writes to the db (the reason being I was testing WP-Types and it was so slow I couldn’t use it).

    My postmeta table now has 65 rows in it showing each custom fields label and name as meta-keys.

    So my concern is – I have over 10,000 posts to import which, if the first post is any indication, will give me a wp_postmeta table with probably over a million rows. 10,000 x 65 + all the additional data most of my posts will have – they won’t be as small and simple as the test post.

    When I was running WP-Types, on a test server with 2gb of ram for website functions, it was timing out with only 4500 posts but with 385,000 rows in the postmeta table.

    I run other sites with well over 10,000 posts and they are all very fast…but I don’t use any custom fields or post types.

    Is anyone out there running a similar config? Also, I’m using an Azure VM with 4 core and 7gb running Ubuntu 14.04LTS (with an 8gb swap file) and LAMP.

    Before I go through all this again 😉 can anyone tell me if they think I’m going to run into the same problems?

    Thanks for taking so much of your time to read this! lol

  • I can’t say if you will definitely run into the same problem. I can say that I have some pretty big sites that I maintain that use ACF extensively and some of the things I’ve created have hundreds of custom fields that ACF manages. This usually requires me to bump up the maximum memory limit for the site. (php ini setting memory_limit)

    I can tell you that for each field that that is saved for a post that ACF creates 2 rows in the postmeta table. One for the value of the field itself and one that tells ACF how to treat that value. So it you have a field group with 100 fields then at a minimum ACF will create 200 rows. Some special fields like repeaters will create 1 row for the repeater itself and 2 rows for each field in the repeater.

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

The topic ‘Database content – is it normal?’ is closed to new replies.