May 25, 2012

Post: Load management Techniques for MySQL

One of the very frequent cases with performance problems with MySQL is what they happen every so often or certain times… need to know it is not MySQL problem, might be even not problem with your MySQL configuration, queries and hardware, even though… with monopolizing replication thread. For example if I need to delete old data instead of DELETE FROM TBL WHERE ts

Post: Ultimate MySQL variable and status reference list

…am constantly referring to the amazing MySQL manual, especially the option and variable reference table. But just….commanual Com_dealloc_sqlblogpercona.commanual Com_deleteblogpercona.commanual Com_delete_multiblogpercona.commanual Com_doblogpercona.commanual Com_drop_dbblogpercona.commanual …

Post: Flexviews - part 3 - improving query performance using materialized views

… the MV. mysql> select mview$pk as rank, customer_id, total_price, total_lines from demo.dashboard_top_customers limit 10; +——+————-+————-+————-+ | rank… functions. Now I delete some line items from orders: mysql> delete -> from order_lines -> where order_id -> between 1 and 100 -> limit 500; Query…

Post: How to recover a single InnoDB table from a Full Backup

…-03-10 | | 10008 | 52668 | 2000-03-10 | 2000-07-31 | +——–+——–+————+————+ mysql> DELETE FROM salaries WHERE emp_no=10008; The next step is… some prerequisites to comply. Percona Server relaxes a lot of limitations and is able to import tables from different Server instance…

Post: Using Flexviews - part two, change data capture

… has serious drawbacks, such that it can’t identify deleted rows and MySQL timestamps may not be flexible enough. The trigger method… the trigger is immediate and affects every transaction. Finally, MySQL has limited trigger support, some of which is the cause of the…) Records: 2 Duplicates: 0 Warnings: 0 And delete data in a second transaction: mysql> delete from test.demo where c1=1; Query OK…

Post: How to debug long-running transactions in MySQL

… accumulate or fill up the disk. #!/bin/bash # Begin by deleting things more than 7 days old find /root/tcpdumps/ -type… JOIN information_schema.processlist p on b.trx_mysql_thread_id = p.ID LIMIT 1′) if [ "${host}" ]; then echo “Host ${host} is… port 3306 and port ${port} > /root/tcpdumps/`date +%s`-tcpdump & mysql -e ‘show innodb status\Gshow full processlist’ > /root/tcpdumps/`date +%s…

Post: Performance Schema tables stats

DELETE: 18127219 AVG_TIMER_DELETE: 303505097 MAX_TIMER_DELETE: 62494969560 Or using this data we can TOP 5 accessed tables via mysql>…from file_summary_by_instance where FILE_NAME like ‘%sbtest55%’ limit 5G *************************** 1. row *************************** FILE_NAME: /data/tachion/sb/…

Post: Tuning InnoDB Concurrency Tickets

… parent(id) -> ON DELETE CASCADE -> ) ENGINE=INNODB; — 0 Tickets Used Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO parent…: 0 Warnings: 0 mysql> DELETE FROM child WHERE 1; — 6 Tickets Used Query OK, 3 rows affected (0.02 sec) mysql> ALTER TABLE… docs, the number of threads that can enter InnoDB is limited by innodb_thread_concurrency (which is why these two variables…

Post: Limiting InnoDB Data Dictionary

… if table is used or not on MySQL level. We made it by checking MySQL table_cache. If table is placed in table_cache we consider it as used, if not – we can delete it… by data dictionary may exceed innodb_dict_size_limit, as we can’t delete any table entry from it. To finalize this…

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

… HEAP for in memory tables. So first MySQL versions did not bother naming variables with … to work also if tables have “holes” (deleted rows) which can help significantly. delay_key_…will be badly corrupted on crash. delayed_insert_limit, delayed_insert_timeout, delayed_queue_size Delayed inserts…