sql - Memory consumption of having a column LONGTEXT in MySQL database -
i'm creating log table in mysql database. 1 of field used in approximately 5% of logs , contains stack traces , others lengthy informations developers. considering using longtext field wondering if using make database grow quickly, if column empty in 95% of rows.
so question in clear, there memory consumption of having longtext column when column empty in of rows? example, if use text instead , truncate strings long, save lot of space on database.
it's important add there lot of logs on time.
thanks!
although varies 1 difference of mysql another, in general terms blob-type columns longtext inherently variable length , take no storage when not used. space needed them isn't allocated in case of null
value.
as concerns scaling, there's 1 way find out: generate gigantic amount of log data test schema you're intending use. push full dies, , metrics on how can handle. that'll give idea of how viable approach is.
Comments
Post a Comment