June 19, 2013

Post: Beware of MySQL Data Truncation

mysql> insert into article_comment values(4300000002,1); Query OK, 1 row affected, 1 warning (0.00 sec) mysql> select * from article_comment; +————+————+ | article_id | comment… 1 row in set (0.00 sec) MySQL optimizer behaves rather strange in such case (at least in MySQL 5.0…

Post: How Percona does a MySQL Performance Audit

…and Created_disk_tmp_tables, I’ll paste in mysql> show global variables like ‘%table_size%’; +———————+———–+ | Variable_name | Value | …query log analysis is done, I format all my analysis for sending, add in things I may have noticed along the way (comments

Post: Getting use of Slave in MySQL Replication

MySQL Slave as it can contain stale data. It is true delay is often insignificant but in times of heavy load or inQuery type based distribution Elect some queries as “time critical” and other queries as “non time critical” in… checking when post was last modified/commented and using slaves to work …

Post: Full Text Search Webinar Questions Followup

MySQL queries would make them even slower, I’m sure. Indeed, the result set of 20 rows from SphinxQL queries…depend on being able to reindex as data in the source database changes.  This is an …other. Hernan S. commented on the blog post where I announced the webinar: We evaluated MySQL vs Solr. …

Post: MySQL Limitations Part 4: One thread per connection

… forgetting some reasons that this matters — please fill in whatever’s missing in the comments. There can be more than one solution to…-query parallelism, for example. It would be lovely to have those things, if you’re running a data warehouse on MySQL, and in some cases for other uses too (note that most databases that do have these query plans usually…

Post: Concatenating MyISAM files

…: 6 And then, back in mysql: mysql> use test Database changed mysql> flush tables; Query OK, 0 rows affected (0.00 sec) mysql> select * from test_concat; +—-+ | id | +—-+ | 1 | | 2 | | 3 | | 4 | | 5 | | 6 | +—-+ 6 rows incomment, I added varchar and deleted rows to the mix: mysql> truncate table test_concat; Query OK, 0 rows affected (0.00 sec) mysql

Post: MySQL Slow query log in the table

As of MySQL 5.1 get MySQL slow query log logged in mysql.slow_log table instead of the file as you had in previous versions… table implementation in MySQL is well though of in regards to avoiding trouble. For example you can’t ALTER log table while query is… to “normalize” query by removing comments and replacing constants with some placeholders as this would allow to aggregate log entirely in SQL finding…

Post: Tools and Techniques for Index Design Webinar Questions Followup

… relevant to current versions of MySQL. Q: How do the upcoming changes in MySQL 5.6 change the best … in the grouping column. Then sorting it may be more likely to happen in memory. Q: Can you comment … a given query in the worst case. This method tries to quantify the cost of a query, but ultimately …

Post: How to obtain the "LES" (Last Executed Statement) from an Optimized Core Dump?

… First we inspect the mysql_execute_command frame: (gdb) frame 21 #21 0x00000000005a30af in mysql_execute_command (thd=thd… <Query_arena> = {_vptr.Query_arena = 0xf4a6a8, free_list = 0x7f3e84005f10, mem_root = 0x33afac0, state = Query_arena::STMT_CONVENTIONAL_EXECUTION}, id = 0, query_strip_comments

Post: Visualization tools for pt-query-digest tables

When you process MySQL slow query logs using pt-query-digest you can store samples of each query into query_review table and historical values… and CREATE statements; * reviewing and commenting on queries. Despite its lack of ability to save predefined reports in the web interface for easy…