#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    165
    Rep Power
    11

    Master and slave database size difference


    Hi everyone,

    when I run this to compare:

    select table_schema as 'Database Name', sum( data_length + index_length ) / 1024 / 1024 as 'Database Size in MB', sum( data_free )/ 1024 / 1024 as ‘Free Space in MB’ from information_schema.tables group by table_schema;

    Some of the dbs on the slave are smaller by several megabytes. Is this common?

    Thanks!
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Posts
    165
    Rep Power
    11
    a little more info... After some server updates a few weeks ago, I saw a replication error (I hadn't looked in a while - I know, bad me), so I took a dump of the master db and used that to recreate the slave before resetting and restarting replication. There have been no replication errors since. As such, I imagine that the data is the same in both. Since there are continual inserts, updates, etc., I can't really use checksums or hashes to compare the data files. Even one second difference would cause the checks not to match.

    Is there a better way to check whether the data in both dbs is the same?

    Thanks!

IMN logo majestic logo threadwatch logo seochat tools logo