I am considering a problem.
In C language, we are suggested that the size of struct should be multiples of 2-byte.
e.q.:
struct text{
int index;//assume int is 4 byte.
char [8] word;
}//alought text is only 12 bytes, compiler would assign 16 bytes for this struct
Therefore, I am wondering does the record size(thanks of Gordon Linoff) of MySQL encounter the same problem?
Moreover, how can I optimize MySQL via controlling table size?
First, you are referring to a record size and not the table size.
Second, databases do not work the way that procedural languages do. Records are stored on pages, which are filled up until no more fit. Then additional pages are used. Typically, there are many records on a page.
You can get an idea of what a page looks like here. They are complicated but basically hidden from the user.
It sounds like you are attempting "premature optimization". This isn't quite the root of all evil, but it is a major distraction to getting things accomplished. In other words, define the record as you need it defined. Do what you want to do. If you have performance problems, then fix those when they arise.
The size of a record is going to be the least of your problems. Databases perform I/O in units of pages, so the difference between 12 and 16 bytes is meaningless for a single record. You still have to read the entire page (which is much larger).