Reputation: 15464
I have more than 100 dbs and I was trying to query size of all dbs using the sql below
SELECT table_schema "DB Name",
Round(Sum(data_length + index_length) / 1024 , 1) "DB Size"
FROM information_schema.tables
GROUP BY table_schema;
Which gave me following
gpsv3_gpsv2_sscwdo 330784.0
gpsv3_pault 72704.0
When I try to find the size from folder level with command below
sudo du /var/lib/mysql | sort -n
I got the follwing
779804 /var/lib/mysql/gpsv3_gpsv2_sscwdo
479016 /var/lib/mysql/gpsv3_pault
I was under impression that that there should few MB difference but it is more than 5 times for gpsv3_pault
. is there anything I have misunderstood ?
Thanks
Upvotes: 0
Views: 322