Filip,
----- Original Message -----
From: "Filip Rachunek" <filip.rachunek@stripped>
Newsgroups: mailing.database.myodbc
Sent: Monday, October 18, 2004 10:33 AM
Subject: Varchar and InnoDB
> Hello,
> I have a big table in my InnoDB database (more than 10 million rows)
> and it contains a column of varchar(40) type. For some reason I need
> to extend this column to varchar(160) but I don't expect to use the
> whole capacity of this column, except for several rare cases.
> My question is, after I make this "alter table" action, can it have a
> negative impact on MySQL performance or required disk space? It is
> just an ordinary non-indexed column, not used in where or sort by
> conditions.
the ALTER TABLE itself may take quite long if you have many secondary keys
on the table.
Increasing the maximum length of a VARCHAR column in InnoDB does not consume
more space at all. InnoDB strips the trailing spaces from a VARCHAR column
before storing to the data files.
> Thank you.
> Filip Rachunek
Best regards,
Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM
tables
http://www.innodb.com/order.php
Order MySQL technical support from https://order.mysql.com/