This article shows you how to use a little-known InnoDB feature to find out what is holding the lock for which an InnoDB transaction is waiting. I then show you how to use an undocumented feature to make this even easier with innotop. Background One of the most common complaints I’ve heard from DBAs used to other database servers is “I can’t find out who holds the locks that are blocking all these connections and making them time out.
Community version 1.2.1 of Zmanda Recovery Manager (ZRM) for MySQL, a robust and intelligent solution for backup and recovery of MySQL databases is available for download at Zmanda downloads page.
Changes in this release:
- Bug fixes
- Source tar ball (including debian package files)
- Help from ZRM online sites
For documentation see, ZRM for MySQL users manual. Please use bugzilla to report bugs and feature requests. If you have questions or feedback, please post them in forums.
Quite typical query for reporting applications is to find top X values. If you analyze Web Site logs you would look at most popular web pages or search engine keywords which bring you most of the traffic. If you're looking at ecommerce reporting you may be interested in best selling product or top sales people. This information may often need simple select query, however what if you would like to show percents not just absolute value ?
For illustration purposes I've created a syntetic table filled with some 30mil rows evenly spread in 10.000 groups.
PLAIN TEXT SQL:
- CREATE TABLE `dt` (
- `grp` int(10) UNSIGNED NOT NULL,
- `slack` varchar(50) DEFAULT NULL
- ) ENGINE=MyISAM DEFAULT CHARSET=latin1
And I'm using some silly like query to illustrate some search is required, so count(*) can't be optimized away for MyISAM Tables.
To show …
[Read more]Its been a while since I last blogged. I’ve shifted through many countries now, since my post on UC-J Day 1. Since then, I’ve updated the set, and there are way more photos, even from Day 2. Day 2 photos are more interesting, because I bothered to take my 70-200/2.8 lens with me (no monopod though, so I bumped up the ISO for stability).
Basically, day 2 went on well, with a little less attendees in comparison to day 1, thanks to the horrendous weather. Most of us took cabs, but some brave souls got an umbrella and walked. Heh. Pictures from many sushi dinners should also make their way online soon. There was a very nice reception later on in the evening, with lots of people winning prizes and so on.
The general consensus from all the …
[Read more]The more I work with MySQL Performance Optimization and Optimization for other applications the better I understand I have to less believe in common sense or common sense of documentation writers and do more benchmarks and performance research. I just recently wrote about rather surprising results with sort performance and today I've discovered even read_buffer_size selection may be less than obvious.
What do we generally hear about read_buffer_size tuning ? If you want fast full table scans for large table you should set this variable to some high value. Sample my.cnf values on large memory sizes recommend 1M settings and MySQL built-in default is 128K. Some people having a lot of memory and few concurrent connections set it as high as 32M in hopes for better performance. Lets see if it is …
[Read more]By Tim O'Reilly
In comments on Andy Oram's recent Radar post about patents, reader Ian Mulvany of Nature made a point that I thought bears repeating as a new top-level entry. Ian wrote:
There is an interesting complement to the patent system in the domain of assigning credit to ideas, which is the academic peer-review system.
The inventor of the idea in the case of academia is the author. The equivalent to the patent office is the editorial board of the academic journal that the author submits to.
There is an idiosyncratic historical connection between the two systems too. Einstein famously worked as a patent clerk in Bern, Switzerland, before becoming a published academic.
At the time …
[Read more]
Read Partitioning In MySQL, Part 1 before reading
this post.
Partition pruning is the most critical
performance component about partitioning. Partitioning can ease
management of your data (for example the ability to just backup
or restore a single partition or the ability to drop a no longer
needed partition) but the main reason people add partitions is
for performance.
Pruning helps performance by only reading the partitions that
need to be read for a query. For example, if you have a table
range partitioned by year that has partitions for the years 2000
through 2010. If you write a query selecting data between 2002
and 2005, you don't want to have to scan all 10 partitions.
…
The support for Rails in NetBeans IDE has improved considerably in the past few days. Greg and Ludo have been working on ramping up the jMaki NetBeans module as well. This screencast is an update to #web2 and shows how the development experience for creating a jMaki-enabled Rails application is drastically simplified.
The screencast shows how a jMaki-wrapped Yahoo and …
[Read more]
I talked about this matter already, but now it's
time to wrap up.
The Summer of code is over, and the project I have mentored is
finished, with a new tool as its outcome, the MySQL test creator.
The student who developed this tool, Charlie
Cahoon, did a decent job. All in all, considering that it was
his first serious developing experience, he got an excellent
result. The maturity stage is still alpha, but he did the
breakthrough work to get the development of this tool in the
right track.
What do we have in hour hands? A tool that will speed up and make …
The glut of information was dulling awareness, not aiding it
--Jerry Mander
The aggregate tables enhance reporting performance1 by reducing
the amount of data that needs to be queried for widely used
reports. Aggregate awareness at the database or the query tool
makes the use of aggregate tables transparent to the user of the
data warehouse.
Consider the example star schema for a financial services company as a
simple case for aggregations:
|
Account (customer) 30 million records |
|
|
|
Product |
|
|
\ |
|
/ … |