Tables size = 0
-
Hi,
All my table sizes in my blog are reported =0 with no table rows by this plugin, and no db engine is listed. I am using MySql 5.5 with MyISAM engine. What’s happening?
-
yes, the database name is Sql665784 but I can’t change it. It is up to my ISP
Okay, that’s what I thought the problem could be.
So, as a fix I’ve added LCASE and strtolower functions for comparing the database name.
Why it’s timing out now is really bizarre… It should work!
You did uninstall the old version, right?Yes. And I have just repeated all operations…
Removed 3.1.4 and reinstalled 3.1.3: 0 rows and 0 table size.
Remove 3.1.3 and installed 3.1.4: hangs.
The plugin was working since 6 months. Then my ISP gave me a new mysql upgraded to 5.5, so I have exported the tables and reimported in the new one. Changed addresses in wp-config, and checked that the site is wirking perfectly. Only issue I found is this.
FYI, MySql 5.5 defaults to InnoDB for new tables, but I have imported tables from MyISAM.
Just installed the new beta version on another one of my production sites and it works flawless…
Man, this is a tough one! ??
What I will do next is take the original 3.1.3 version and only change the upper/lowercase issues.Thanks for your support!
No! Grazie to you!
(I am a developer too, so I understand the frustration…)But the upper/lowercase was working in 3.1.3 before I moved the databse to the new MySql… (the databse name was almost the same, with different numbers, but was always starting with Sql…)
Okay, new (tweaked) version of 3.1.3 is available at:
https://cagewebdev.com/fabio/rvg-optimize-database-3.1.3.zipStill timeout.
Pfffffhhhhh…
I only added some LCASE’s in two queries:
WHERE table_schema = ‘”.strtolower(DB_NAME).”‘
became:
WHERE LCASE(table_schema) = ‘”.strtolower(DB_NAME).”‘
and
WHERE table_schema = ‘”.strtolower(DB_NAME).”‘
AND table_name = ‘”.strtolower($tables[$i][0]).”‘became:
WHERE LCASE(table_schema) = ‘”.strtolower(DB_NAME).”‘
AND LCASE(table_name) = ‘”.strtolower($tables[$i][0]).”‘That cannot cause the plugin to hang (in my opinion), so there must be another cause… No idea what to look for…
Send me the full query to manually run on the new database
Hey Fabio,
You can edit my plugin yourself, I guess. I suggest to dump the offending queries and run them in PHPMyAdmin.
Re-install the current (not modified) version of the plugin via the WordPress repository.
And then add the following debug messages to the main script:
// v2.7.5
$sql = “
SELECT engine, (
data_length + index_length
) AS size, table_rows
FROM information_schema.TABLES
WHERE table_schema = ‘”.strtolower(DB_NAME).”‘
AND table_name = ‘”.$tables[$i][0].”‘
“;echo $sql.’
‘;$table_info = $wpdb -> get_results($sql);
and
// v2.7.5
$sql = “
SELECT SUM( data_length + index_length ) size
FROM information_schema.TABLES
WHERE table_schema = ‘”.strtolower(DB_NAME).”‘
GROUP BY table_schema
“;echo $sql.’
‘;$res = $wpdb -> get_results($sql);
So, add the two ‘echo’ lines (echo $sql.’
‘;)While running the plugin the two queries will be listed on the page.
Show me the queries and copy and paste them in PHPMyAdmin, please!
Oops it replaced the BR’s in the code with actual line breaks…
The resulting query is huge! Is it correct?
SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_album' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_album_gallery' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_gallery' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_image' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_image_comment' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_image_rate' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_image_tag' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_option' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_shortcode' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_bwg_theme' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_commentmeta' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_comments' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_easy_gallery' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_easy_gallery_images' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_gallery_albums' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_gallery_licensing' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_gallery_pics' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_gallery_settings' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_links' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_options' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_postmeta' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_posts' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_term_relationships' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_term_taxonomy' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_terms' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_usermeta' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_users' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wppg_album' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wppg_downloads' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wppg_gallery' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wppg_global_meta' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wppg_settings' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_campaign' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_campaign_list' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_custom_field' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_email' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_email_user_stat' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_email_user_url' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_form' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_list' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_queue' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_url' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_url_mail' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_user' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_user_field' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_user_history' SELECT engine, ( data_length + index_length ) AS size, table_rows FROM information_schema.TABLES WHERE table_schema = 'sql835818_1' AND table_name = 'mythos_wysija_user_list'
I’m trying to post here the result, but it doesn’t go Maybe it is too long…
Okay, then please use my email:
info at cagewebdev dot com
- The topic ‘Tables size = 0’ is closed to new replies.