about data file size

Hi,

By default i have a data file defined like this:

ibdata1:10M:autoextend

Now, if i check in the OS i see that this file has a size of 60GB. My question is, is this the real size of the data file? If not, how can i calculate it?

is it a good practice to define it in autoextend? if not what is the best max size recomended? What happen when the ibdata1 has reached the max size?

Thanks for the help about this topic.

The 60GB is the real size of the file since you have autoextend on it and you have put more data in it has expanded to this size.
Although if you have deleted a lot of data then this file will not reduce it’s size, it stays this size and the available space in the file will be reused until you have added so much data that there is no more available room in the file at which point it starts to grow again.

Yes I would recommend keeping one table space with autoextend. That way your application will not crash when/if you fill up your tablespace. Instead you will get a slight performance degradation when new inserts forces MySQL to autoextend the tablespace, but that is usually much more preferable than your application stops working and MySQL writes a lot of errors in the log file.

Thanks sterin71 for your answer.