[Koha-bugs] [Bug 18336] Use utf8mb4 instead of utf8 for MySQL tables, columns, and connections

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 16 19:51:26 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18336

--- Comment #70 from Victor Grousset/tuxayo <victor.grousset at biblibre.com> ---
(In reply to Tomás Cohen Arazi from comment #68)
> (In reply to Victor Grousset/tuxayo from comment #67)
> > Can there be a loss of performance after "text" → "mediumtext"?
> > 
> > https://stackoverflow.com/questions/3516290/any-pitfalls-of-converting-mysql-
> > text-field-to-mediumtext
> > > with PHP 5.6 and PDO, mediumtext uses more memory than text (with same value, an empty string). In my simple test, the difference is 0.5 MiB vs. 1.5 MiB
> > 
> > Our ORM might have such an issue.
> 
> Can u think of a way to meassure that? I'm asking at #dbix-class at OFTC with
> no answers yet.

Is there anything that could keep alive for few seconds at least instances of
ORM objects? Maybe this isn't an issue then.

Well if some operations cause memory spikes of let's say 100MiB instead of
30MiB then that could be an issue.

Actually it could be worse:
https://stackoverflow.com/questions/3516290/any-pitfalls-of-converting-mysql-text-field-to-mediumtext

> Some client interface libraries pre-allocate a buffer to hold results, and they allocate enough memory for the largest possible value, since the client doesn't know the data until you fetch.

> Therefore the library would allocate 16MB per mediumtext while it would allocate 64KB for a text. This is something to watch out for if you have a low memory limit in your client layer. For instance, PHP has a memory_limit config parameter for scripts, and the buffer allocated for data result sets would count toward this.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list