Over-the-Top Tales from the Trenches: Bringing order to the chaos of every day DBA life. My aim in any posting is to make your job as a DBA in Oracle, SQLserver and MySQL easier. Ever wondered how to get a quick count of the number of connections per hostname from MySQL? Welcome to the arcane (but extremely powerful) world of the MySQL command line pager.
At the end of my last MySQL post I mentioned strange behavior with GROUP BY and DISTINCT. This MySQL “feature” could save some resources on sorts and aggregates but generally I would avoid it as this is not portable solution. Generally speaking, query output is non-deterministic — it depends on the full table scan implementation and on the physical order of rows in a table. This means that it’s actually a bug and , instead, MySQL should produce and error on those statements.
MySQL – No Index Used With ORDER BY + LIMIT and DISTINCT. This is actually a follow up on my previous post. Developers tried to rewrite all statements and even overdid it. As we say in Russia – “teach fool how to pray and he will break his forehead”.
Filesorts and temp tables are a necessary evil in MySQL, used when MySQL must sort the data before returning the output to the user. They are the most common issue with slow queries in MySQL, the main reason being that if the output is too large, you can kiss goodbye in-memory performance, and say hello to disk access.
Today is the first time I had to look at MySQL performance. Tiny database as web application back-end was having significant performance issues with spikes of CPU workload. After identifying problematic queries, I found a pile of statements using IN subqueries. I asked around and our MySQL experts assured me that this is one of the minor and not so disturbing issues, in fact. I can’t imagine what those disturbing issue are. I guess Oracle XE does have some advantages over MySQL for small installations.
In MySQL–land, failovers for redundancy, disaster recovery, or load balancing are performed by master databases and slave databases, the most popular method using binlog replication. There are a couple more methods of replication which aren’t covered here. Also see the MySQL Replication FAQ. The methods are the same, but the formatting of the procedure(s) are less than ideal.
First of all, there is now FREE Solaris 10 media kit available to order by mail if you’re not fancy downloading several GB. By the way, it also includes Sun Studio (anyone using it?). Second, I found a cool article on Solaris BigAdmin portal – Deployment Guide for an Open Source Stack on the Solaris 10 OS also available as PDF.
I just read this excellent review by Matt Asay of an excellent interview by Guy Kawasaki (of garage.com and apple fame) of MySQL CEO Marten Mickos.
Well I have been back from Collaborate 2006 for over a week now and decided that I should also make my presentation available from the Pythian web site. While there I participated in three sessions. I joined Michael Abbey, Ian Abramson, and Carl Dudley on a panel for the Non-Oracle DBA. My first presentation was PostgreSQL for the Oracle DBA. My second solo-presentation was Oracle 10g Data Pump 101.
Oracle announced that it would release a free for production use version of its database product, limited to 4G in the database, 1G of ram and a single CPU. Today, the four major open source DBMS vendors (MySQL, Postgres, Firebird, and Sleepycat) unanimously rejected Oracle’s new free-to-use Express Edition beta, claiming that users will not accept the capacity limits of the new oracle product.