Hi!

On Oct 03, Mike Lucente wrote:
> I'm running out of space while creating indexes on some fairly large (1.8
> GB) tables, even though I have quite a bit of space available in the
> partition (utilization is at 30%).
> 
> I know that the create process works as follows (from the manual):
> 
> Create a new table named `A-xxx' with the requested changes. 
>       All rows from the old table are copied to `A-xxx'. 
>       The old table is renamed `B-xxx'. 
>       `A-xxx' is renamed to your old table name. 
>       `B-xxx' is deleted.
> 
> Given that, I should have plenty of room. Disk utilization doesn't appear
> to exceed 60% during the process.
> 
> Any idea what could be causing this?
> 
> ** Running RH 7.1 on a Dell 2450. MySQL version 3.23.29a-gamma-log.

Most probably, you're getting out of space for temp files.
MySQL usually tries to create indexes _after_ loading the data, not in
the same time. It uses then "repair by sort" method which gives more
than 100 times speedup.

These temporary files are created NOT in the datadir (--datadir) but in the tempdir
(--tempdir). Be sure it has enough space.

Then, those temporary files can be significantly larger than original
MYD (and resulting MYI) file, especially if you have, for example,
VARCHAR(255) field, that is mostly occupated by one- or two-characher
strings.

Regards,
Sergei

-- 
MySQL Development Team
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
       <___/

---------------------------------------------------------------------
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