Created
July 17, 2020 17:51
-
-
Save seanconklin/666661cac1fef0e2c793c9739f37f7aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
'Autoload KB' as name, ROUND( SUM( LENGTH( option_value ) ) / 1024 ) as size, null as autoload | |
FROM wp_options | |
WHERE autoload = 'yes' | |
UNION | |
SELECT 'Autoload count', count( * ), null as autoload | |
FROM wp_options | |
WHERE autoload = 'yes' | |
UNION ( | |
SELECT option_name, length( option_value ), autoload | |
FROM wp_options | |
WHERE autoload = 'yes' | |
ORDER BY length( option_value ) DESC | |
LIMIT 20 | |
) | |
UNION ( | |
SELECT option_name, length( option_value ), autoload | |
FROM wp_options | |
WHERE autoload = 'no' | |
ORDER BY length( option_value ) DESC | |
LIMIT 20 | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment