May 26, 2012

Post: Idea: Couple of more string types

MySQL has a lot of string data types – CHAR, VARCHAR, BLOB, TEXT, ENUM and bunch of variants such … :) I would also like to see type HEXCHAR which would be able to store hex strings, such as those returned as MD5… is quite inconvenient to deal with strings like that in MySQL. Either you store them as strings and waste space or you…

Post: JOIN Performance & Charsets

… using numeric types as keys, but maybe you’ve inherited a schema that you can’t change or have chosen string types as… the following EXPLAIN: *************************** 1. row *************************** id: 1 select_type: SIMPLE table: t1 type: index possible_keys: PRIMARY key: PRIMARY key_len: 18…

Post: Why Index could refuse to work ?

…id=”10″; +—-+————-+———+——+—————+———+———+——-+——+————-+ | id | select_type | table | type | possible_keys | key |…strings “5″, “05″ “0005″ “5.0″ which all have same numeric value but different strings – this is why simple coversion to the string

Post: Be careful when joining on CONCAT

… non-binary strings, the result is a non-binary string. If the arguments include any binary strings, the result is a binary string. A numeric argument is converted to its equivalent binary string form; if you want to avoid that, you can use an explicit type cast… OK, let’s…

Post: To pack or not to pack - MyISAM Key compression

… understand performance implications of this approach. Note trailing spaces for strings are not stored in the index even if it is… of special hack :) The fact MyISAM will by default compress string keys but not integer keys is the biggest reason joins… testing 4 types of queries: select count(*) from t1, t1 t2 where t1.c=t2.c – simple join by string column select…

Post: Integers in PHP, running with scissors, and portability

… called unpack() which essentially allows to convert different types of data from binary strings to PHP variables. What if you try to… large unsigned 32bit numbers would be converted to float, or string, or something, but handled properly. However, a couple or so… binary stream, you have to: convert it to float or string manually, do that depending on int size on current platform…

Post: Updated msl (microslow) patch, installation walk-through!

… allowed in a comma-separated string. [microtime, query_plan, innodb] msl patch currently can log three types of information: query timings, execution…,innodb”. Note: You should put double quotes around the entire string of comma-separated flags. Currently “microtime” is mandatory meaning…

Post: Picking datatype for STATUS fields

… variants which can be used lets talk about two important types of these status fields. First is BOOLEAN or YES/NO… ENUM declaration – not according to their string values. So make sure to add values specify strings for ENUM in sorted way to… a discipline and have the table which has integer to string mapping or at least have constants with descriptive names defined…

Comment: PHP vs. BIGINT vs. float conversion caveat

… from string. First of all, I don’t see any strings there. I can see a float converted to a string in 2… a crossplatform way (because it uses its own float-to-string and string-to-float utilities since 5.2 or so, I…? — Oh, yeah, surely “designers of PHP 5 (released in 2004) type system were either not aware of” long long. As well…

Post: Converting Character Sets

… avoids the issue of implicit conversions by changing each data type to it’s binary counterpart before conversion. Due to implementation… it is feature complete. Outstanding issues include: – Proper handling of string foreign keys (currently fails, but you probably shouldn’t be using strings as foreign keys anyway …) – Allow throttling of the number of…