No, generally you won't see a *huge* performance difference between the two, but there are times when it makes sense to split a large variable-row-length table into one fixed-length table and one or more variable-length tables. There is a small performance gain from using fixed-length records (in MyISAM) over variable-length records because the algorithm for retrieving a fixed-size record is slightly easier than the variable-length records...but there are better reasons to consider splitting a large table into smaller tables....
Namely, if you have a situation where you have certain fields which are queried *often* and other fields which are *not* queried often, it can makes sense to split the oft-queried fields into its own table (commonly called a "master" table) and the other fields into a separate table (sometimes called a "detail" or "extra" table).
The fewer the fields in the master table (and the fewer the number of bytes used per field), the faster searches will be, as more records will fit into the various buffers, enabling more records to be searched in the same amount of memory. This strategy is even more important in InnoDB, where the fixed page-size of the clustered data page makes a bigger difference than the page-less ISAM format. In the InnoDB structure, the more records you can cram into a single 16KB data page, the faster all your queries will run, because InnoDB loads data one page at a time. If queries are repeatedly run against only a small subset of a table's fields, it can make a huge performance difference by separating off these fields from the others, because it a) enables more records to fit on the single data page and b) can allow for *multiple clustering keys*, which can be very handy in certain situations, particularly when you want the advantages of quick range-query scans and also sppedy single key lookups, but on different fields...
Anyway, I'm babbling a bit. Sorry. To return to your question, changing the data type from VARCHAR() to CHAR() can make a small difference in MyISAM tables (not really in InnoDB, which doesn't distinguish between the two), but this difference is not a huge one (IMHO) compared to the performance advantages you get from separating off frequently used fields from infrequently used fields...
Partager