June 19, 2013

Post: Managing Slave Lag with MySQL Replication

MySQL Replication goes in single thread it is enough for one statement to get stuck to have all replication stalled. Long Queries – MySQL Replication executes queries one after another on… MySQL Replication runs in single thread (two threads, but only one of them executes the query) it is not able to use the CPU

Post: Apache PHP MySQL and Runaway Scripts

… scripts running very long time. For simplicity I did not use MySQL, but other system call – sleep() which has similar behavior for… of time but does not really use any CPU time: Script which is same as previous one but which also outputs some data… is unfortunately very serious limitation in practice when you’re using MySQL with PHP as you can have single runaway query which…

Post: The Optimization That (Often) Isn't: Index Merge Intersection

Prior to version 5.0, MySQL could only use one index per table in a given query without any exceptions; … would show N possible index choices but only one index actually used. To some extent, MySQL 5.0 and later changed this situation… rows examined” graph had dropped several orders of magnitude and CPU utilization on the machine had dropped by about 2/3…

Post: Helgrinding MySQL with InnoDB for Synchronisation Errors, Fun and Profit

… is relatively widely used for the MySQL server development: there is support for it in the MySQL Test Framework,… state, it is likely that if other CPU cores will read this same variable, they …_system_variables_hash. Deadlock is possible when one connection issues SHOW VARIABLES or equivalent while …

Post: MySQL Wish for 2013 - Better Memory Accounting

…as well as where CPU resources are spent. (Performance Schema does not accounts CPU usage directly but …per purpose to understand what memory is currently used for. One thing to note with memory allocation …usage by individual MySQL users or even track how much these users are using. Now as MySQL 5.6…

Post: Scaling problems still exist in MySQL 5.5 and Percona Server 5.5

… you still can’t get use of more than 8 cores effectively (which would correspond to single CPU socket these days) Here…::exec,mysql_sel ect,handle_select,execute_sqlcom_select,mysql_execute_command,mysql_parse,dispatch_command,do_command,do_handle_one_conn ection,handle_one…::exec,mysql_select,handle_select,execu te_sqlcom_select,mysql_execute_command,mysql_parse,dispatch_command,do_command,do_handle_one_connection,handle_one_conne…

Post: Using Flexviews - part two, change data capture

…you use row-based binary logs (RBR). If you don’t have MySQL 5.1 or aren’t using …materialized views. Most database servers have some spare CPU for binary log parsing. Run the setup script… automatically be captured. Insert data in one transaction (two rows): mysql> insert into test.demo values (NULL,…

Post: SQL Injection Questions Followup

uses dynamic SQL in stored procedures extensively.  They found that it was awkward because of the limits of the procedure language MySQL offers, and also it moves too much computation load onto their database server.  Their MySQL server became CPU-bound, while… it’s appropriate to use a stored procedure, even one that writes dynamic SQL.  And it only takes one SQL injection vulnerability to…

Post: Top 5 Wishes for MySQL

… Be Distributed One of the most common buzzwords used together with MySQL is Scale Out, but to say the truth MySQL does not provide… use when such need arises but we still can’t deny – MySQL does not handle complex queries well, being able to use only one CPU effectively on single node and no true federation support. 4. Be Solid MySQL has very good stability…

Post: Jeremy Cole on MySQL Replication

… flush their cache. Watch out for MySQL 5.0 – if you enabled Binary log with MySQL 5.0 you loose group commit… practically have only One CPU to handle replication load. Furthermore if you have multiple disks they will not be used effectively as replication SQL thread will typically submit IO requests to the disk one by one so only one drive will…