June 18, 2013

Post: Heikki Tuuri Innodb answers - Part I

… the system’s memory the kernel can decide (incorrectly) to swap out MySQL. There are two solutions here. Memlock and O_DIRECT… IO pressure and OS may swap out not buffer pool but some other important parts of MySQL process. Q20: We’ve migrated… for fast lookups: it can be used if the columns are the first columns in an index. I think it is sound…

Post: Knowing what pt-online-schema-change will do

…_country`, `score` LIMIT ?, 2 /*next chunk boundary*/ Not swapping tables because this is a dry run. …knows. Are the columns used correctly given their data types and definitions?  If a column is defined as… bugs in the tool, problems with the MySQL server (privileges, etc.), or other oddities, there …

Post: PHP Large result sets and summary tables.

swapping development server which had just 4GB of Ram (and plenty of swap space) like crazy. Why ? Because by default mysql_query uses mysql… real call you can get errors is when you run mysql_query , mysql_fetch_row simply reads data from memory and so… the temporary table with auto_increment column and fetch data from this table using auto increment column ranges instead. I would especially…

Comment: Innodb Performance Optimization Basics

First. Check “si so” columns in VMSTAT – if you have some swap used but there is no swapping activity I would not worry… some instructions here: http://www.mysqlperformanceblog.com/2006/06/08/mysql-server-variables-sql-layer-or-storage-engine-specific/ you can… my experience it does not really work well for preventing swapping.

Post: Memory allocation in Stored Function

… so long time ago I had task to update string column in table with 10mil+ rows, and, as the manipulation was… memory and giant swap. The case was worth to look deeply – let’s try simple table (experiments with MySQL 5.0.45… check only select: mysql> select avg(length(hello(name))) from testf; and here is vmstat 5 output: procs ———–memory———- —swap– —–io—- –system…

Comment: MySQL Server Memory Usage

…’, ’2′ ‘Com_show_collations’, ’176788′ ‘Com_show_column_types’, ’0′ ‘Com_show_create_db’, ’8…, 882264k in_d, 96252k in_c Swap: 4194224k av, 553604k used, 3640620k free …mysql.sock pid-file=/var/run/mysql/mysql.pid datadir=/db/disk2/mysql/data log-bin=/var/log/mysql/log log-slow-queries=/var/log/mysql

Post: How much overhead is caused by on disk temporary tables

… which needs to be put to temporary tables – BLOB/TEXT columns are not supported with MEMORY storage engine so must use… table contains 1.000.000 rows with mostly unique “c” column. mysql> explain select count(*) cnt,c from gt group by c… in set (27 min 5.51 sec) VMSTAT: procs ———–memory———- —swap– —–io—- –system– —–cpu—— r b swpd free buff cache si…

Post: Faster Point In Time Recovery with LVM2 Snaphots and Binary Logs

mysql> drop table salaries; — Ooops! Query OK, 0 rows affected (0.49 sec) mysql> alter table employees add column