Large sites performance issue
-
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 populatetcs3_wp_optionsoptions fields, which is indirectly hooked toinitWP 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=syncpage, how difficult would it be to only load that data there, and not in every request?Thanks,
Toni
The topic ‘Large sites performance issue’ is closed to new replies.