I have a table stored about 100,000 rows data in InnoDB engine. I just copy the data to a memory engine table, but I find that the size of the new one is much large than orignal table. Why?
| Rows | Engine | Size |
| 96702 | Memory|741MB|
|96952|InnoDB|28MB|
WHY?
Memory engine tables use a fixed-length row-storage format. Variable-length types such as VARCHAR are stored using a fixed length.
Note: Loading your data from an InnoDB engine into a Memory engine is really a SQL anti-pattern (because of data duplication). You really should configure the InnoDB buffer pool on your MySQL server. InnoDB will then outperform a Memory engine with many clients because a Memory engine is row locking based
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.