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. …
I'm still working away at this book. What an experience. Constant
cloud over my head, making me feel obligated to use any spare
time I have I should be writing. Oh, and then there is Drizzle
which requires some time, not to mention DBD::drizzle.
Most of the work is reading, making sure what I write is correct.
I mean, most of what I write off the top of my head is correct,
because I know the material, but I want to make sure. There's
always that inner voice inside that says "Is this crap?" or "Wait
till so and so reads this, they will be shaking their heads and
saying blah blah blah". I suppose that's my insecurities
talking.
I like what I've written so far. I think is *is* good.
The basic content about MySQL gets a bit tedious, but I've
started working on other sections such as stored procedures and
now UDFs. I came up with a great UDF idea that I will use for an
example in the book as well as a great new …
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 …
I haven’t been using vim for very long, but I’ve gotten over the initial learning curve of getting used to the different editing modes. With some help from the guys in #vim on irc.freenode.net, I managed to get this gem:
map <C-d> :call SwitchDB()<CR>
:function SwitchDB()
: let g:current_db = input("Database > ")
:endfunction
map <C-m> :call Doquery()<CR>
:function Doquery()
: if !exists("g:current_db")
: call SwitchDB()
: endif
: let query_string = input(g:current_db . " > " )
: if query_string != ""
: exe "!mysql " . g:current_db . " -e \"" . escape(query_string,
'"') . "\""
: endif
:endfunction
Control-m to execute a query. Control-d to switch databases. It’ll prompt you the first time.