I’m at some internal MySQL training today at our US HQ. In a room of 11 people we are all using our laptops for access to additional machines. The beauty of this is we have Linux (Ubuntu 5.10, 6.10, 7.04, Red Hat Fedora), Mac OS/X and Windows Operating Systems on various staff machines. It’s great to realize we are not locked into just one infrastructure, and we have the ability to all do our work effectively and MySQL works just as well across these technologies. I can’t however SSH from my iPhone yet, unlike my previous Nokia E62 PDA.
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
MySQL uses disk. Ok, so everybody knew that. MySQL uses disk in two primary ways.
- Random I/O (Reading & Writing Data/Index blocks)
- Sequential I/O (Binary Log, InnoDB Redo Log)
Historically it’s been best practice to separate these onto
different spindles, and also separating the OS and tmp space onto
a third spindle. With commodity H/W that can be easily done, but
today a lot of people use SAN. Is this a good thing for a MySQL
Database?
That’s a topic of much discussion at a later time, however I’ll
add two points. A lot of SAN configurations are RAID 5, and RAID
10 is a better choice due to removing the requirement to
calculate the parity. Second, last week I observed a RAID disk
failure and it took an incredible long time for the disk to be
re-built. Just how many SAN uses our there have actually timed a
disk rebuild on a loaded system and seen the impact on the system
in general.
…
[Read more]I was reading some points on a Blog post today here. I didn’t see it via Planet MySQL but via a Google Alert.
The post has several good beginner points on MySQL Performance, but included the point “Literal current date is better than using the CURRENT_DATE() function because literals will use the query cache but functions won?t.”
How true, I must admit I’d not considered this in reviewing code for sites that use the Query Cache heavily. Non deterministic functions invalid use of the Query Cache (Except for recent Bug #29053 which is also an interesting read. Note to self, read the new bugs more often when free time permits). Back on point.
So if you have a query like “Select the news for …
[Read more]I’ve been able to steal some more time to work on my script following My ?hourly? MySQL monitor script Version 0.03 almost a month ago.
The purpose of this script is simple. Create an hourly ‘cron’ job that records and monitors information against the OS and MySQL Server. This is most helpful when environments simply don’t have any monitoring in place. I’ve found it very productive when running a benchmark on site to simply enable for an hour. An amount of analysis is required, but I at least have a baseline of data collection. That is the first goal.
So hourly.0.05.tar.gz is taking some shape, and has the following new features:
- Provide configurable flag to enable/disable OS and MySQL tests
- Added MYSQL_SID support, allowing for running MySQL tests against …
I didn’t know you could actually do this before addressing this problem in a benchmark using 5.0.36.
MySQL allows you to update two tables with a single UPDATE statement. I knew you could reference two tables in an UPDATE statement but not update both. However when working with a client after benchmarking I observed a large number of Created_tmp_disk_tables via SHOW GLOBAL STATUS and found that this query was the offending query only for certain circumstances. Understanding took a little longer.
schema.sql
DROP TABLE IF EXISTS a; CREATE TABLE a( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, i INT UNSIGNED NOT NULL, c CHAR(1) NOT NULL) ENGINE=INNODB; DROP TABLE IF EXISTS b; CREATE TABLE b( id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, i INT UNSIGNED NOT NULL, c CHAR(1) NOT NULL, t TEXT NOT NULL) ENGINE=INNODB;
data.sql
INSERT INTO a VALUES(1,1,'a'); INSERT INTO a …[Read more]
First it was the SlashDot effect, then it was the Digg effect, now it’s the Facebook effect. I have a friend at Facebook and he was talking about the effect of the Facebook Platform API that was released a few weeks ago. Sites were now struggling to cope with the effect of massive amounts of new traffic, ensuring that experienced MySQL Consultants will have plenty of scale out opportunities.
Here is an abstract from an article I read recently. Analyzing the Facebook Platform, three weeks in
Translation: unless you already have, or are prepared to quickly
procure, a 100-500+ server infrastructure and everything
associated with …
I was reading only last week the notes from Wikipedia: Site Internals, Configuration and Code
Examples, and Management Issues Tutorial by Domas Mituzas at
the recent 2007
MySQL Conference. I didn’t attend this session, like a lot of
sessions too much good stuff at the same time.
It’s obviously taken a while to catch up on my reading, but with the present MySQL 12 days of Scale-Out I thought I’ll complete my notes for all to see.
If you have never used Wikipedia well, why are you reading this, you should spend an hour there now. Alexa places Wikipedia in one of the top 10 visited sites on the Internet.
…
[Read more]I was asked recently to confirm a consistent state of data in a non-transactional MySQL table after a failing statement updating multiple rows did not complete successfully.
Hmmm, this is what I did.
- Created a MEMORY table
- Populated with some data, and a Primary Key
- Updated the Primary Key so that it failed with a Duplicate Key Error after updating only half the rows
- Confirmed that the rows that were updated, were, and the rows that were not updated, were not
DROP TABLE IF EXISTS mem1; CREATE TABLE mem1( i1 INT UNSIGNED NOT NULL PRIMARY KEY, c1 CHAR(10) NOT NULL, dt TIMESTAMP) ENGINE=MEMORY; INSERT INTO mem1(i1,c1) VALUES (1,'a'), (2,'b'), (3,'c'), (4,'d'), (5,'e'); SELECT * FROM mem1; +----+----+---------------------+ | i1 | c1 | dt | +----+----+---------------------+ | 1 | a | 2007-06-14 17:26:29 | | 2 | b | 2007-06-14 17:26:29 | | 3 | c | 2007-06-14 …[Read more]
I recently saw the Planet MySQL post Five months with MySQL Cluster by Brian Moon.
Thought I’d add my 5 cents worth (Australian’s don’t have 1 cent coins any more to make 2 cents worth)
Firstly, it’s great you wrote about your experiences in moving to MySQL Cluster. I think more people should.
Joins
“We used a lot of joins. We learned (later) that joins in the cluster are not a good idea.”
MySQL Cluster’s number one strength is Primary Key Lookups, it’s very good you learned that joins (especially say 5-6-7 table joins) are not a good idea, it is not a strength, and certainly not scalable to thousands of queries per second.
Rewrite
“We rewrote our application (basically, our public web site) to use …
[Read more]
Announced at the 2007 Conference as MySQL Applications of the
Year - #1 in 3G Mobile Entertainment, Amp’d Mobile is no longer
the poster boy.
Amp?d Mobile Implodes: Burns $360 million, Declares Bankruptcy. Wow, that’s news on a Sunday.