• Hello,

    Thanks for your work on this plugin.

    We are running several heavy loaded sites with more than 2 million rows in wp_postmeta.

    Function tcs3_wp_media::s3_sync_count() is being called every request WordPress receives (as it is needed to populate tcs3_wp_options options fields, which is indirectly hooked to init WP hook).

    The query that function is doing is this one:

    SELECT count(*) as num FROM {$wpdb->posts} p JOIN {$wpdb->postmeta} pm ON p.ID = pm.post_id AND meta_key = 'is_on_s3' AND meta_value = '1' WHERE post_type = 'attachment'

    which takes almost a second to execute.

    As this information is only needed at /wp-admin/admin.php?page=tcs3-admin&tab=sync page, how difficult would it be to only load that data there, and not in every request?

    Thanks,
    Toni

    • This topic was modified 7 years, 6 months ago by tonyps47.

The topic ‘Large sites performance issue’ is closed to new replies.