June 18, 2013

Post: Benchmarking Percona Server TokuDB vs InnoDB

…=rand(0,10000) // distributed by pareto distribution $C, $PAD = random_string() BEGIN INSERT INTO sbtest (id, k, c, pad) VALUES ($ID… –report-interval=10 –max-requests=0 –num-threads=32 –rand-type=pareto run and InnoDB options are: [mysqld_safe] numa-interleave… query_cache_size = 0 query_cache_type = 0 ft_min_word_len = 4 #default_table_type = InnoDB thread_stack = 192K tmp_table…

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: SQL Injection Questions Followup

….mysql.com/doc/refman/5.5/en/string-literals.html for more information on string literals. Allan F. asked: Q: Is it… is that you can try embedding a string-termination quote into an input data string, followed by invalid SQL syntax: http://example… trouble when you retrieve the string from the database and output it in an HTML presentation.  This type of security issue is…

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: How to obtain the "LES" (Last Executed Statement) from an Optimized Core Dump?

…_COLUMNS_READ, name = {str = 0×0, length = 0}, lex = 0x33ae900, query_string = {string = { str = 0x7f3e84004ba0 “INSERT INTO testdb_N . t1_temp1_N SELECT… variable type, so we don’t need the typecast to “(THD *)”. Or, better yet, now that we know where the query string is hiding (query_string > string > str), we can use: (gdb) p thd->query_string.string.str In the future…

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…