Slow Database Queries to wp_mail_bank_meta
-
Good Day, Thank you for your wonderful plugin.
I have noticed that several email configuration queries to wp_mail_bank_meta are taking a long time on my target site. The list of queries are at the bottom of this post.
It seems that options are being collected with a query that is on a database field that is not unique?.. and, in my case ((mail bank has processed over 30,000 emails on sharedhope.org, thank you!)) the table is full of meta_key fields of email_logs. This is causing slow downs on the site..
Maybe these configuration fields could be moved to the wp_options table on unique fields? or, just as good, maybe the query could be adapted to search for the FIRST and only result, as opposed to looking through all 30,000 records?
I apologize, I’m not a database guru and might be using the wrong language to describe the problem.. But I think it is important.
SLOWEST QUERIES on every page… (all mail bank) they’re now adding to almost a half a second… 100 times longer than regular queries..:(
This data was pulled with Query Monitor.
——————————————————————SELECT meta_value
FROM wp_mail_bank_meta
WHERE meta_key = ’email_configuration’ /* From [sharedhope.org/wp-admin/plugins.php] in [/nas/content/live/sharedhopesite/wp-content/plugins/wp-mail-bank/includes/mailer.php:270] */mail_bank_auth_host::override_wp_mail_function
0.0762
SELECT meta_value
FROM wp_mail_bank_meta
WHERE meta_key IN(‘settings’,’email_configuration’) /* From [sharedhope.org/wp-admin/plugins.php] in [/nas/content/live/sharedhopesite/wp-content/plugins/wp-mail-bank/wp-mail-bank.php:483] */user_functions_for_mail_bank
0.0728
SELECT meta_value
FROM wp_mail_bank_meta
WHERE meta_key = ‘roles_and_capabilities’ /* From [sharedhope.org/wp-admin/plugins.php] in [/nas/content/live/sharedhopesite/wp-content/plugins/wp-mail-bank/wp-mail-bank.php:77] */get_users_capabilities_mail_bank
0.0754
SELECT meta_value from wp_mail_bank_meta
WHERE meta_key = ‘roles_and_capabilities’ /* From [sharedhope.org/wp-admin/plugins.php] in [/nas/content/live/sharedhopesite/wp-content/plugins/wp-mail-bank/lib/sidebar-menu.php:32] */include_once(‘/plugins/wp-mail-bank/lib/sidebar-menu.php’)
0.0762
SELECT meta_value
FROM wp_mail_bank_meta
WHERE meta_key = ‘roles_and_capabilities’ /* From [sharedhope.org/wp-admin/plugins.php] in [/nas/content/live/sharedhopesite/wp-content/plugins/wp-mail-bank/wp-mail-bank.php:77] */get_users_capabilities_mail_bank
0.0744
SELECT meta_value
FROM wp_mail_bank_meta
WHERE meta_key = ‘roles_and_capabilities’ /* From [sharedhope.org/wp-admin/plugins.php] in [/nas/content/live/sharedhopesite/wp-content/plugins/wp-mail-bank/wp-mail-bank.php:77] */get_users_capabilities_mail_bank
0.0758
- The topic ‘Slow Database Queries to wp_mail_bank_meta’ is closed to new replies.