Strip your TEXT fields
-
Upload
gabriela-davila -
Category
Software
-
view
741 -
download
1
Transcript of Strip your TEXT fields
Doing an `ALTER TABLE`
• Creates a new table with the new structure
• Copies the data from the old table to the new table
• Renames the new table as the old table
Alter PK from INT to BIGINT*
- 2.147.483.648 to
2.147.483.647
INT
- 922.337.203.854.775.808 to
922.337.203.854.775.807
BIGINT
**out of scale*signed
Why?
• 1 text file for field for every record
• The text files are stored in a different place than the table location
MyISAM
• Faster read speed
• Supports FULLTEXT indexes
• Non transactional
• Higher probability of data loss
InnoDB
• Transactional
• Data integrity
• Until the 5.6 version, MySQL didn’t support FULLTEXT indexes
Conclusions
• There is no right solution
• Some solutions may add another layer to the application
• Some solutions can only be applied in a low coupling system
More information
• http://gabriela.io/blog/2015/04/27/strip-your-text-field/• http://www.percona.com/blog/2010/02/09/blob-storage-in-innodb/