Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
In 5.3 derived_merge was passing the CONVERT_IF_BIGGER_TO_BLOB and would force the optimizer not to produce on disk temporary table . It stopped working in 5.5
I have documented the issue here :
http://varokism.blogspot.fr/2011/12/back-on-disk-temporary-tables.html
At that time no test case have been produce and merging may have break this improvement.
Attachments
Issue Links
- is blocked by
-
MDEV-19 Memory tables: VARCHAR and BLOB support
-
- Stalled
-
I have explored why MySQL/MariaDB has CONVERT_IF_BIGGER_TO_BLOB constant.
The reason is: temporary tables use "Fixed" row format. This means that a temporary table with this definition
CREATE TABLE tmp (col1 varchar(3000) CHARACTER SET utf8);
will use 3000* max_char_len(utf8) = 3000* 3= 9000 bytes for each row. Dynamic row format (and blobs will use dynamic row format) is much more economical.
One may ask a question: why can't we use a heap temporary table with a dynamic row format? The answer for this is not yet clear for me. I'll investigate.