Jump to content
  • 0

Unusual Databse size


lordgeorge

Question

Hey all

 

For some time i have been monitoring the database sizes, as you do B) .

I have noticed that one of the servers has a 8mb character data table :huh:.

Ok so you would expect 5000+ ines, nope.. 560 lines. For the life of me i cannot understand why this is so large.

Comparison to another server that has nearly 2k lines and its roughly 4mb. I have compared the two but looks fine.

The only abnormal colum is that the char data has a TIMESTAMP collum, while no other servers DB does.

 

Any ideas ?

 

Cheers

George

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I guess you will get an idea for yourself if you have a look at a row in this table.

You can have character rows where the player/character has nothing in the inventory...or for any row the inventory can be completely full of items (backup also and whatever). But ok, I guess the usage of inventories by players should be more or less the same in average for your sb and your friends db tables.

 

Another point is (as far as I know) that if you delete entries from a table, the memory is not automatically made free at this time. There are some functions/commands which do that for the db, but if I remember correctly that's dependent on the settings and what kind of table that is (MyIsam or other type).

 

So if you had already 20000 lines in the character_data table and your friend only the 2000 rows you've talked about...I guess this makes a difference.

 

 

With this command you could do a comparison:

show table status from epoch (epoch is my DB name)

You see there avg row length and index length and some values like this. Maybe that helps to understand why it's so different for him.

http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html

 

You can have a look here:

http://incomservice.net/icsblog/2011/software/decrease-mysql-database-size-after-deleting-records.html

 

And here:

http://dev.mysql.com/doc/refman/5.5/en/optimize-table.html

 

And there are other commands like flush which cleans the query cache and query results cache of a table. So as a starting point as you only asked for an idea :))

I did not have a look for my server as there is no need so far...otherwise I would provide some more detailed help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...