May 26, 2012

Post: How Percona does a MySQL Performance Audit

with 32GB of memory and there is very little load. I see that mysqld is using 10g of memory withmysql –user=mysql –pid-file=/var/run/mysqld/mysqld.pid –skip-external-locking –port=3306 –socket=/var/db/mysql/mysql…tables that really matter. That’s why I save this part of the analysis for last. …

Post: MySQL Prepared Statements

… client. So in MySQL 4.1 Prepared statement came. Do not mix these native Server Side Prepared Statements with emulated prepared statements… to use prepared statements: Save on query parsing Save on data conversion and copying Avoid SQL Injection Save memory on handling blobs There are…

Post: MySQL Query Cache

… from query cache, query parsing step is saved. Queries must be absolutely the same As …party application – You can’t change how it works with MySQL to add caching but you can enable … in cache effectively wasting memory. Distirbuted caching systems can effectively use memory on multiple systems so …

Post: Dynamic row format for MEMORY tables

… eBay implemented true-VARCHAR support for MEMORY tables for MySQL 5.0. Although this patch did … if the dynamic row format delivers the memory savings for VARCHAR fields agains the fixed row format…are still used for temporary tables where the MEMORY tables with dynamic row format could be used …

Post: High-Performance Click Analysis with MySQL

… section below on technologies), but if you’re doing this with vanilla MySQL, you will need to aggregate your data. What you… replication. You can save that work by either using MySQL 5.1′s row-based replication, or in MySQL 5.0 and earlier… time and run on many fewer disk drives with much less memory, or even with 10-15x fewer servers. Clever application design, and…

Post: 3 ways MySQL uses indexes

…require sorting. Using index for sorting often comes together with using index to find rows, however it can …per index entry instead of one but it can save IO orders of magnitude in some cases – Indexes …to speed up queries even if data is in memory. If MySQL is only reading index and not accessing …

Post: Replication of MEMORY (HEAP) Tables

…-ignore-table=db.memory_table. Note you should not be using STATEMENT level replication with INSERT … SELECT into this memory table for this… my.cnf; run SLAVE STOP; dump all your memory tables using MySQLDump; Restart the MySQL As planned; Load Dumped tables; run SLAVE… better ? MySQL could have features to make it more convenient. It would be great to have MEMORY table option which would save table…

Post: Why MySQL could be slow with large tables ?

… using indexes. In fact even MySQL optimizer currently does not take it into account. For In memory workload index accesses might be… also clustered keys in Innodb which combine index access with data access, saving you IO for completely disk bound workloads. There are… tips Try to fit data set you’re working with in memory – Processing in memory is so much faster and you have whole…

Post: Should you have your swap file enabled while running MySQL ?

So you’re running dedicated MySQL Linux box with plenty of memory, so the good question arises if you should have swap … for second case) we will be able to save a bit of memory as there are some programs which are started but… and swap buffer space out even with /proc/sys/vm/swappiness =0. You can lock MySQL in memory by using –memlock option but…

Post: The Doom of Multiple Storage Engines

…in Optimizer – such as in memory nature of MEMORY storage engine, clustering by …MySQL Server which drops everything but Innodb Storage engine (it could be NDB, PBXT etc, it does not matter). We could save…nasty “FLUSH TABLE WITH READLOCK” and hoping nobody is touching “mysql” database any more….