String 4000 (MEDIUMTEXT) fields occupying a lot of space in a SQL table row
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2015 10:56 PM
I have created a table with 15 string fields of length 4000 (SQL type has become MEDIUMTEXT, as expected). As long as no more than 10 of the string fields contain large amounts of data, all goes well, to a certain extend even regardless of how much data is in each of the fields. As soon as 11 or more fields contain large amounts of data (> 750 chars each) , I get below error message:
java.sql.BatchUpdateException: Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
From what I've read so far, it seems that, next to a pointer, the first (up to) 768 bytes of each MEDIUMTEXT are stored in the record itself, causing the record to reach its max size of 8126 bytes total fairly quickly.
How can I either prevent the first 768 bytes of each MEDIUMTEXT field from being stored in the record or increase to max row size?
Suggestions are highly appreciated. Regards,
Anko
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2016 06:45 AM
Hi ,
Even i have the same issue as your. Can you please let me know what is the work around you have got?
Thanks,
Sivaranjani