June 19, 2013

Post: Analyzing Slow Query Table in MySQL 5.6

log file, it outputs the query time and lock time as floating-point numerics to microsecond scale: sql/log.cc, MYSQL_QUERY_LOG::write(): 1945 /* For slow query logquery log table into a flat file in the format of a conventional query log file, which you can then use as input to pt-query

Post: MySQL Slow query log in the table

query log in production while tuning one of the systems. It is pretty nice to be able to work with data in SQL… insert… select statement as you need it. One little gotcha which confused me first is the order query come in the log file. If you used to do tail -100 log-slow.log and now change it to SELECT * FROM slow_log ORDER…

Post: Logging MySQL queries from the client instead of the server

… to. Another reason for logging from the client is to log only selected traffic that is of interest… SQL. The main drawback to making the application itself log the queries is that it might not log … option to mk-query-digest. You can even make it print out a “slow query log file” format with the …

Post: Ultimate MySQL variable and status reference list

sql_modeblogpercona.commanual sql_notesblogpercona.commanual sql_quote_show_createblogpercona.commanual sql_safe_updatesblogpercona.commanual sql_select_limitblogpercona.commanual sql_slave_skip_counterblogpercona.commanual sql

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

file sql/slave.cc patching file sql/sql_cache.cc patching file sql/sql_class.cc patching file sql/sql_class.h patching file sql/sql_parse.cc patching file sql/sql_select.cc patching file sql/sql_show.cc patching file sql

Post: Shard-Query EC2 images available

…third parse time). $ echo “select count(*) from ontime_fact;” | ./run_query Array ( [count(*)] => 135125787 )… the ./run_query command, called pivot_results cd shard-query/ $ ./run_query < queries.sql | tee raw |./pivot_…1000 innodb-log-buffer-size=32M innodb-log-file-size=128M innodb-open-files=1000 …

Post: MySQL 5.5 and MySQL 5.6 default variable values differences

… tables and ran the query: mysql [localhost] {msandbox} (test) > select var55.variable_name,left(…INNODB_BUFFER_POOL_INSTANCES | 1 | 8 | | QUERY_CACHE_SIZE | 0 | 1048576 | | SLOW_QUERY_LOG_FILE | /mnt/data/sandboxes/msb_… if someone tries to enable it. sql_mode has NO_ENGINE_SUBSTITUTION value …

Post: mk-query-digest, query comments and the query cache

SQL statements. These comments are extremely convenient, because they are written into MySQL log files as part of the query. This includes the general log… a specially formatted SQL comment. This information can then be cross-referenced between MySQL logs and Apache logs. select 1 — File: myfile.php…

Post: MySQL Server Variables - SQL layer or Storage Engine specific.

… transaction logs, slow query log or general log. flush, flush_time Flushing (closing) of tables after query…_min_word_len, ft_query_expansion_limit, ft_stopword_file FullText search related variables….SQL level items as Query Cache also could use this feature. low_priority_updates If enabled selects

Post: Be productive with the MySQL command line

…command. Let’s say you have the following query: mysql> select count(*) from film left join film_category…inner joins and use capital letters for reserved SQL words. Instead of manually editing the statement, …if you look at the content of the queries.log file, you will see a copy of your session….