Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem in converting big table from type MyISAM to INNODB

Status
Not open for further replies.

fsqueeen

Programmer
Jul 8, 2002
43
MY
i'm trying to convert a big table (approx 200,000 rows) from type MYISAM to INNODB but i found problem after converting the table type.

I tried 2 ways to convert it,

TblA - myISAM (original table with 200,420 rows)
TblB - (to be INNODB table)

1. Copy structure of TblA to TblB, alter TblB to INNODB type, then insert records from TblA into TblB - the error is, TblB (203,373 rows) becomes more rows than TblA after these operations!

2. Copy structure + data of TblA to TblB, then alter table type of TblB to INNODB type - the error is, TblB (1xx,xxx rows) becomes less rows than TblA now!

I don't know what's wrong with these operations, after all, i cant get a INNODB type table that has same rows number with the original table... pls help...

thanks in advance...


 
from phpmyadmin, juz by looking at the total rows for this table.
 
If you do "SELECT COUNT(*) FROM tblname" for both tables, do you still get different figures?
 
If you just want to convert from MyISAM to MyInnoDB, then it<s fairly simple.

1) MAKE A BACKUP OF YOUR DATABASE (OR TABLE)
2) ALTER TABLE tableToConvert TYPE=InnoDB;

Voilà!
 
Thanks TonyGroves, by using this query to count table rows, i able to get the same row number finally!

but, may i know why the total rows shown is different everytime i browse through this table? And, what is meant by this sentence -> InnoDB free: 46080 kB ?

thanks...
 
I've no idea why it shows different figures. It sounds like a bug in PHPMyAdmin, but I've never used that program, so there could be a reason for it. I don't know what the "InnoDB free" figure means; it could be an indication of the total file space used.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top