> This implies that I have to preguess how large each data file will be.

Correct.  However, all InnoDB tables will share this space automatically.
(Corrolary:  A single table will automatically span several InnoDB data
files if need be.)


> Now, I understand with MyISAM tables that they just "grow" until they
> fill up your filesystem or hit some OS limit such as the 2Gb limit in
> Linux < 2.4.X.

Also correct.  InnoDB has a notion of a "tablespace", which is a
pre-allocated chunk of space on disk set aside for InnoDB tables.  Among
other benefits, this means you don't have to worry about filesystem
fragmentation hurting the performance of your DB access.


> 1) If I setup InnoDB with a 500Mb data file then suddenly run out of
> space could I:
>  * seemlessly just stack another data file by adjusting my startup
> options

Yes.  You can keep adding files as often as needed.  Before we had our
current DB server I had to do this twice -- I first allocated 2GB to InnoDB,
and we started to run low, so I allocated another 2GB, and when we started
to run low again, I tossed in another 2GB (at which point we had used most
of the storage capacity of the machine)...  This does however require
manually editing the my.conf and restarting MySQL.


>  * seemlessly just make the data file larger by changing the file size
>    (i.e. don't add another datafile, just increase the file size)

Qualified no.  You cannot change the size of an InnoDB data file after it
has been created.  However, recent versions of InnoDB/MySQL include an
"AutoExtend" option (I think that's what it's called).  One InnoDB file may
be flagged as "AutoExtend", and this file *will* automatically grow as
needed (in 8MB chunks IIRC).

I would generally advise against using this option however, and simply
preallocate sufficient space.  If you are dedicating a machine to running
only MySQL and you are using only InnoDB tables then you should be able to
pretty much use all the available disk space for your InnoDB tablespace.

As an example, our InnoDB tablespace on our (new) main DB server is 32GB,
spread across 2 separate hard drives.  A 3rd hard drive contains the OS,
MySQL itself, the transaction journals/logs, and what few MyISAM tables we
have.


-JF


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to