Reputation: 26075
I have a table with ~100000 rows. It's 62.6 MB and it has no overhead. I changed 2 columns from varchar(255)
to varchar(2047)
. The columns are for URLs.
After the change, the table still has the same number of rows, but the size decreased to 59.2 MB.
I'm very confused as to why this happened. Shouldn't varchar(2047)
be either the same size or greater? Can someone explain why an increase in varchar length led to a smaller size?
Upvotes: 0
Views: 723
Reputation: 11171
I do not know the exactly cause, but this is what I believe.
OPTIMIZE TABLE your_table_name
to re-organize your database again.Upvotes: 1