Lets face it, when it comes to storage engines, performance is
everything. But then again, so is stability and data
integrity!
So as a developer of an engine, which should you concentrate on
first: performance, stability or data integrity?
I know there are not many that have to deal with this stuff, but
here is my advice anyway: go for performance first.
The reason is simple, significant performance tuning can have a
serious affect on both stability and data integrity. And this
means you need to repeat a lot of the debugging and testing you
did before.
For example one of the optimizations I made for 1.0.04 required a
number of changes to the index cache. One thing was to make the
LRU (least recently used) list global, it was segment based
before. During the change I copy-pasted a "lru" pointer instead
of a "mru" pointer :(
The result was not a crash, but the engine …
Inspired by http://blogs.sun.com/thava/entry/dump_mysql_frm_file_header I jumped into http://forge.mysql.com/wiki/MySQL_Internals_File_Formats and tried to write a decoder for the .frm files. Sadly the internals document is missing all the interesting parts.
So it was time to get the hands dirty and get into the code ... it got really dirty. But I found a little gem in there.
If you are interested take a look at
open_binary_frm() or create_frm() in
sql/table.cc or mysql_create_frm() in
sql/unireg.cc. It has all the glory. You may have to
wipe off the dust a bit has this code is (I bet) as old as MySQL
is.
.frm-files are from a time when Monty wrote
Unireg …
Many people have asked (via IM, email, Twitter) how my new job is going, what craigslist is like, etc. So here are a few thoughts about my first two weeks in the new job.
The Commute
Despite what folks said in the comments of my little announcement, the commute really isn't that bad. Taking I-280 from Willow Glen (San Jose) up to near Golden Gate Park is about 55 minutes from pulling out of the garage to parking in San Francisco. And I've been able to find parking on Lincoln each time I've gone up--usually within 4-6 blocks from the office.
So 55 minutes of driving plus about 10 minutes of walking (which is good for me anyway) is very manageable if you're not doing it every day. If I did, I'd be less up-beat about it, I'm sure.
Having said that, I am going to experiment with the mass transit options as well. I'd …
[Read more]
The next meeting of the North Texas MySQL Meetup will be held on
Monday the 4th of August at the Sun offices off the Dallas
Tollway. We are covering MySQL basics by following the material
for the Certified MySQL Associate exam.
We welcome all and details can be found at
http://mysql.meetup.com/250/
Just thought I’d update you. We got quite a few good errata from readers, and I took a couple weekends and went through the book with a fine-toothed comb, catching typos and subtle errors that crept in at some point (TPC benchmarks were labeled as TCP benchmarks — did you catch that one?). I marked up my book and mailed it to O’Reilly, who went well above and beyond what they normally do for errata. Normally, once a book is in print they will fix only serious technical errors. They fixed everything, even going as far as rearranging page breaks and moving figures to improve readability.
The second printing is on Monday August 4th. Already! I think the book has been selling a lot better than anticipated. I know I am psyched to see it remain in the top couple thousand on Amazon. And they thought it was a big deal when it broke five thousand!
In other news, it’s going to be translated into Spanish, Polish, and Portuguese. So now …
[Read more]JOINs are expensive and it most typical the fewer tables (for the same database) you join the better performance you will get. As for any rules there are however exceptions
The one I'm speaking about comes from the issue with MySQL optimizer stopping using further index key parts as soon as there is a range clause on the previous key part. So if you have INDEX(A,B) and have a where clause A BETWEEN 5 and 10 AND B=6 only the first part (A) of the index will be used which can be seriously affect performance. Of course in this example you can use index (B,A) but there are many similar cases when it is not possible.
I have described couple of solutions to this problem - using IN list instead of range or UNION which however require rather serious application changes and also can result in huge …
[Read more]July 31st 2006 was my last day working for MySQL and August 1st I started what later was incorporated Percona with Vadim joining me September 1st as co-founder.
Two years is a significant anniversary for any startup - surviving (and being profitable) for 2 years can be seen as validation of our business model and strategy and we're quite happy about this.
So what is our strategy ? I left MySQL with idea of building company which will be fair in rewarding their employees for their contribution, in particular engineers which do a lot of heavy lifting in technology companies. I really liked many of Monty's ideas as he implemented during early years of MySQL (you can see many of these same ideas described in Hacking Companies article). We're not just …
[Read more]
Over in CNET, Matt Asay has posted an article The open-source job shortage, talking about large
enterprises' need for developers with deep MySQL
experience.
While he is correct about the need for talent with that skillset,
there are plenty of effective solutions.
A number of months ago, Harper Reed asked me where he could hire MySQL
talent, and I told him to take his existing staff, and run them
thru MySQL training. That seems to have worked for him.
That's now my stock answer when people ask where they can hire
MySQL talent.
When you need to go up to the next level, get and read the book
High Performance MySQL, Second Edition. The book
is …
Just thought I’d update you. We got quite a few good errata from readers, and I took a couple weekends and went through the book with a fine-toothed comb, catching typos and subtle errors that crept in at some point (TPC benchmarks were labeled as TCP benchmarks – did you catch that one?). I marked up my book and mailed it to O’Reilly, who went well above and beyond what they normally do for errata.
Before I get to post my OSCON reflection I see I didn’t post this (which I reference).
At OSCON opening keynotes Tim O’Reilly Interviews Monty Widenius & Brian Aker. This provided some interesting answers in a Q & A session. Here is some of the discussion.
TO: So 6 months in. How is it with Sun?
BA: Really rewarding environment. My first question was? You are
going to send me free H/W. No H/W has been delivered yet, or
access to the masses, still hoping. Sun is a very engineering
driven company.
MW. Thanks God we didn’t go public. Starting to do closed sourced
components, going public this would have continued.
TO: Sun saved MySQL from public market/ insulated from
market.
MW: 6 months in, Sun still trying to figure out what they bought.
Sun has made a commitment to open source throughout the
organization. …