shortcutsolutions
Forum Replies Created
-
Forum: Plugins
In reply to: [404 Solution] sql queries casting as binary are slowWP docs cover how to make a WP compatible table: https://codex.ww.wp.xz.cn/Creating_Tables_with_Plugins
example: $charset_collate = $wpdb->get_charset_collate();
WP gives you a function to determine the correct collation when you create a table. For existing tables you can use ALTER TABLE to change it.
https://dev.mysql.com/doc/refman/8.0/en/charset-table.html
Those errors should only happen in cases where the table specified a different collation, or if the wordpress collate differs from the server default and no value was given when creating the table.
- This reply was modified 3 years, 6 months ago by shortcutsolutions.
Any update on this? We would also like to remove it from a donation form we’ve built for a customer.
I found the issue. When generating that page, you’re doing a get_users() with no arguments which grabs much more data that you’re actually needing to use, and exahasuts the memory on my rather large usercount site.
Since you’re only using ID and display_name, you can instead use: $blogusers = get_users(array(“fields” => array(“ID”, “display_name”)));
in both classes/homepage.php:191 and classes/frontend.php:93
This dramatically reduces memory usage and database load to create the page.