June 19, 2013

Post: Implementing SchemaSpy in your MySQL environment

…5.6.10 sandbox: description=MySQL driver=com.mysql.jdbc.Driver connectionSpec=jdbc:mysql://127.0.0.1:5610…Relationships view of these three tables should look like this: Final Thoughts While I find the … column names in tables, and tables with the string NULL instead of the actual SQL NULL value….

Post: Understanding the maximum number of columns in a MySQL table

… things like NEXT_NUMBER fields (what we know today as auto_increment), CASEUP and CASEDN fields which although not implemented in MySQL, the defines can still found in the source. Basically, it’s why we can’t have nice things (like default… table) An interval in UNIREG speak is a set of strings that are the options for ENUM or SET columns. The…

Post: Benchmarking Percona Server TokuDB vs InnoDB

…) // distributed by pareto distribution $C, $PAD = random_string() BEGIN INSERT INTO sbtest (id, k, c, pad… closer to what I need). Tables looks like: CREATE TABLE `sbtest1` ( `hid` int(10) unsigned…_repair_threads = 1 myisam_recover socket=/var/lib/mysql/mysql.sock user=root skip-grant-tables TokuDB…

Post: SQL Injection Questions Followup

… that contains non-printing characters. The standard API function mysql_real_escape_string() is aware of binary bytes, and will escape appropriately… code.  See http://dev.mysql.com/doc/refman/5.5/en/string-literals.html for more information on string literals. Allan F. asked… you should be able to store such strings safely. Another risk of storing code-like strings in the database is that they may…

Post: MySQL Indexing Best Practices: Webinar Questions Followup

… do something like SELECT * FROM TBL WHERE hash=crc32(‘string‘) AND string=’string‘ The other thing you need to consider is string comparison in MySQL is case insensitive by default while hash comparison will be done case sensitive unless you lowercase string before…

Post: Modeling MySQL Capacity by Measuring Resource Consumptions

…. Before I get into further details I’d like to look at basics – what resources are really … can take a look at procfs for MySQL process: root@ubuntu:/var/log/mysql# cat /proc/19018/stat 19018 (mysqld…wai 0 0 0 0 0 0 0 0 # String: # Databases # Hosts localhost # InnoDB trxID 3BBF3B55 (1/0%), 3BBF3B5A…

Post: Common MySQL traps webinar questions followup

…’, ‘shipped’, ‘canceled’ or ‘archived’. If you use a string, a VARCHAR(15) could be good to store…: Are these recommendations true of all versions of MySQL? If not which versions? The recommendations I …: Is any logical backup facility provided by Percona like mysqldump? No, on the backup side, we’…

Post: Idea: Couple of more string types

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

Post: Identifying the load with the help of pt-query-digest and Percona Server

… say if you were using the vanilla MySQL server, you would see an entry like this in the slow query log: # Time… 0 0 0 # Boolean: # Full scan 100% yes, 0% no # String: # Databases wp_blog_one (264/84%), wp_blog_tw… (36…% yes, 0% no # Tmp table on 100% yes, 0% no # String: # Databases wp_blog_one (105/70%), wp_blog_tw… (34…