May 22, 2012

Comment: Which Linux distribution for a MySQL database server? A specific point of view.

…/Ubuntu is the /etc/mysql/debian-start and the ‘check_for_crashed_tablesfunction (found in /usr/share/mysql/debian-start.inc.sh… select from information_schema. On an instance having thousands+ of tables it has to be disabled in order to not let…

Post: Index Condition Pushdown in MySQL 5.6 and MariaDB 5.5 and its performance impact

I have been working with Peter in preparation for the talk comparing the optimizer enhancements in MySQL 5.6 and MariaDB 5.5. We are taking a look at and benchmarking optimizer enhancements one by one. So in the same way this blog post is aimed at a new optimizer enhancement Index Condition …

Comment: Pitfalls of converting to InnoDB

… and doing a basic insert into an InnoDB table. My database class starts a transaction with a “$…= true; register_shutdown_function(array($this, “__shutdown_check“)); } public function __shutdown_check() { if ($this->transaction_in_progress) { $this->rollback(); } } public function commit() { $ret …

Post: Memory allocation in Stored Function

… in table with 10mil+ rows, and, as the manipulation was non-trivial, I decided this task is good to try Stored Function. Function… in set (0.00 sec) and simple function I’ve found in MySQL manual: CREATE FUNCTION hello (s CHAR(20)) RETURNS CHAR… for avoiding I/O and allocating os cashes let’s check only select: mysql> select avg(length(hello(name))) from testf…

Post: MySQL opening .frm even when table is in table definition cache

… 5.5 you can find in sql/datadict.cc a function named dd_frm_type(). In MySQL 5.1, for some… snippet does is: open the FRM read 10 bytes (“header”) check if it’s a view by doing a string compare… instead of the normal binary format FRM. some legacy check for a generic table type (I think, I haven’t gone back…

Post: How adding another table to JOIN can improve performance ?

… combinations to check). Instead you could use JOIN to get list of days matching range from some pre-generated table and use… is easy to block equality propagation by using some trivial function: mysql> explain select sum(events) from info,dl where myday… data to yet another table though why it does not work for multiple group remains question to check with MySQL Optimizer team…

Post: MySQL Slow query log in the table

… is possible, with exception of TRUNCATE query. Which just recreates table which should be fast. Interesting enough however what would happen… is still proceeds. I have not checked if concurrent insert is always forced for log table if it is allowed or if…. The other handly feature would be the function which returns as as SET list of tables which query is using. This would…

Post: The new cool MySQL patch has landed! Check your queries performance!

…_id: 4 MICROTIME RESOLUTION QUERY TIMING This is the original functionality offered by Microslow patch. The new edition is free of…_Hit: No Full_scan: No Full_join: No Tmp_table: Yes Disk_tmp_table: No # Filesort: Yes Disk_filesort: No Merge_passes… indexes. If a temporary table is required for query execution Tmp_table will be set. Sometimes that table must be created on disk…

Comment: Why you can't rely on a replica for disaster recovery

… “hot” — there’s always a functioning database running against the copy. You can run queries, CHECK TABLEs, whatever you want while replication is…

Post: Ultimate MySQL variable and status reference list

…Com_show_function_codeblogpercona.commanual Com_show_function_statusblogpercona….table_definition_cacheblogpercona.commanual table_lock_wait_timeoutblogpercona.commanual Table_locks_immediateblogpercona.commanual Table_locks_waitedblogpercona.commanual table_open_cacheblogpercona.commanual table