WordPress.org

Ready to get started?Download WordPress

Forums

Optimize Database after Deleting Revisions
[resolved] Size of database is 0 KB before and after optimization?? (13 posts)

  1. Spiril
    Member
    Posted 11 months ago #

    Hi,

    Thanks very much for your plugin. Just installed it and I got rid of a lot of revisions but the database optimization doesn't seem to work for me.

    I got this for all the tables:
    --------------------------------------------

    Optimization result: OK
    Engine:
    Table rows:
    Table size: 0 KB

    SAVINGS:
    size of the database
    BEFORE optimization 0 KB
    AFTER optimization 0 KB
    SAVINGS THIS TIME 0 KB
    TOTAL SAVINGS SINCE THE FIRST RUN 0 KB
    ---------------------------------------------

    Why is that? I didn't exclude any of the tables (Number of excluded tables: 0)
    I tried to run it again and then it said "Optimization Result: Table is already up to date" for each table except for wp_options (got "OK" instead) so maybe it did optimize the tables?

    My host use Litespeed Web Server - don't know if that has anything to do with this?

    http://wordpress.org/plugins/rvg-optimize-database/

  2. cageehv
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Spiril,

    Do you happen to know which version of MySQL is being used?

    Best,
    Rolf

  3. Spiril
    Member
    Posted 11 months ago #

    Hi Rolf,

    Thanks for your speedy reply! I found this in phpMyAdmin:

    Database server

    Server: Localhost via UNIX socket
    Server type: MySQL
    Server version: 5.5.32-cll - MySQL Community Server (GPL)
    Protocol version: 10
    Server charset: UTF-8 Unicode (utf8)

    Web server

    cpsrvd 11.38.2.3
    Database client version: libmysql - 5.0.96
    PHP extension: mysql Documentation

    Maybe that can help you?
    Thanks again.

  4. cageehv
    Member
    Plugin Author

    Posted 11 months ago #

    Hey,

    What do you get when running the following query (PHPMyAdmin):

    SELECT SUM(data_length + index_length) size
    FROM information_schema.TABLES
    WHERE table_schema = 'xxxxxxxxxxxxx'
    GROUP BY table_schema

    (replace the xxxxxxxxxxxxx with the name of your database)

    Rolf

  5. Spiril
    Member
    Posted 11 months ago #

    Hey,

    I get this:

    "This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available."

    and below that:

    "Size:
    3411671"

    Do you think I did something wrong? I replaced xxxxxxxxxxxxxx with the name of my database (copy/pasted it from the line above the query field: "SQL query on database: mydatabasename" so it should be the right one...)

  6. cageehv
    Member
    Plugin Author

    Posted 11 months ago #

    Weird, that warning...

    Can you please try the following query:

    SELECT sum( ist.data_length + ist.index_length ) size
    FROM information_schema.TABLES ist
    WHERE ist.table_schema = 'xxxxxxxxxxxxx'
  7. Spiril
    Member
    Posted 11 months ago #

    I get the exact same message only this time the size is: 3411830

    Not sure what is going on... but don't you think my database has been optimized since the second time I tried to optimize I got the "Optimization Result: Table is already up to date" message?

  8. cageehv
    Member
    Plugin Author

    Posted 11 months ago #

    Hey Spiril,

    Sounds like the optimization is working fine.
    Something is wrong with the reporting about the database operations.

    Maybe some unusual MySQL setting. That's my best guess.

    I will do some more research on it later (hard to fix it if I cannot reproduce it myself...)

    Rolf

  9. Spiril
    Member
    Posted 11 months ago #

    Hey Rolf,

    Yes, your plugin is probably working fine. I haven't changed any of the MySQL settings but maybe my host have? Let me know if you need more information from me - I will continue to use your plugin.

    Thanks for your help,
    Spiril :o)

  10. pcullum
    Member
    Posted 11 months ago #

    I had a similar experience today, when I installed and ran the plugin. It seemed to delete revisions successfully. I etimate that at least 25,000-50,000 revisions were deleted. I have 85,000 posts, many with 3-10 revisions.

    When I ran it a 2nd time, it reported that there was nothing to delete, so the first pass seems to have succeeded in deleting all my old data.

    But the plugin only reports having deleted 0.7 KB (that is 700 bytes) which is normally just 2-3 posts worth of data. And it reports 4024.924 MB as the database size both before and after optimization

    So, I agree there seems to be a reporting problem. BTW, I'm running WP 3.6 and MySQL version 5.1.70-cll

  11. cageehv
    Member
    Plugin Author

    Posted 11 months ago #

    Weird, pcullum

    Not sure what is going on with the reporting...

    For me it seems to work fine

    It's hard to fix it when I cannot reproduce it

    At least it seems to do the cleanup nicely.

    Keep me posted.

    Rolf

  12. cageehv
    Member
    Plugin Author

    Posted 9 months ago #

    Closed because of no more feedback...

  13. KK
    Member
    Posted 2 months ago #

    Here is more feedback. I have the same issue - Reporting is not working.
    My db reads 0 size before and after. I have the same SQL as the OP. If reporting is not working, not sure how we use this plugin. THanks

Reply

You must log in to post.

About this Plugin

About this Topic