Support

Account

Home Forums Feature Requests Large database and "relationship" field performance

Helping

Large database and "relationship" field performance

  • Hello

    I have a site with tenths of thousands of posts. I am trying to add “relationship” field, but queries are really, really slow.

    First: SQL_CALC_FOUND_ROWS
    Please consider adding “no_found_rows” option to advanced-custom-fields\core\fields\relationship.php – it works OK (and many times quicker) when I have added it manually (around line 274), so no SQL_CALC_FOUND_ROWS is added to SQL:
    $options['no_found_rows'] = true;

    Second: no results till search
    Please add an option to “relationship” field to not display any posts on list until search field is filled (it can be configured to display results only if at least X characters are typed in search box). This will speed up page loading process – large queries will be performed only when needed.

  • Hi anojszewski,

    Can you please tell me where exactly you added this line?
    I am using ACF PRO and I am using Post Object field type to get a list from a custom post type but it is ridiculously slow (basically unusable).

    Can you tell me which function I can add this line…
    $options['no_found_rows'] = true;

    Thanks for your help in advance.

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

The topic ‘Large database and "relationship" field performance’ is closed to new replies.