Showing entries 941 to 950 of 1184
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: sql (reset)
High Performance MySQL 2nd Edition is in production

Just a quick note to say we have reached the production stage of the book project. Production is the process of transforming our OpenOffice.org files into the final page layout using a professional typesetting program.

As you can probably guess, this is later than we would have wished. This also means we won’t have the book for sale at the upcoming MySQL Conference and Expo. We will have a display copy at the O’Reilly booth at the conference, and you will be able to pre-order the book at a discount at that booth. (Several details remain to be worked out — do not trust the Amazon.com information on the book, as it is a weird blend of the first and second editions).

The book is very, very good. You will not be disappointed. I can’t think of a credible way to explain how good this book is — it’s just very, very good. Better than anything else you’ve …

[Read more]
Maatkit version 1877 released

Download Maatkit

Maatkit contains essential command-line utilities for MySQL, such as a table checksum tool and query profiler. It provides missing features such as checking slaves for data consistency, with emphasis on quality and scriptability.

This release contains major bug fixes and new features. Some of the changes are not backwards-compatible. It also contains new tools to help you discover replication slaves and move them around the replication hierarchy.

Changelog for mk-archiver:

2008-03-16: version 1.0.8

   * Added --setvars option (bug #1904689, bug #1911371).
   * Added --charset option (bug #1877548).
   * Changed short form of --analyze to -Z to avoid conflict with --charset.

Changelog for mk-deadlock-logger:

2008-03-16: version 1.0.9

   * Added --setvars option (bug #1904689, bug #1911371).
   * Added 'A' part to DSNs (bug #1877548).

Changelog for …
[Read more]
How to install and maintain multiple WordPress blogs easily

My wife has a site that needs two WordPress blog installations. The URLs differ by a subdirectory name. Both blogs need to be (URL-wise) subdirectories of /blog/. They need to be completely independent of each other, yet use the same custom theme. And there used to be just a single blog, which was not in a subdirectory; its permalinks must not break. (It has nice URLs with the date and title in them, not post ID-style URLs). And because I’m the husband, I get to maintain it, so tack “easy to maintain” onto the requirements (it must be easy to upgrade WP in both blogs, for example). In this article I’ll show you how I did it with a single .htaccess file, a single copy of WordPress, two MySQL databases, and a single configuration file.

Fixing URLs

As I mentioned, there used to be a blog at /blog/ which must not break. Suppose this blog was about dogs and my wife has recently started blogging about cats. She wants two …

[Read more]
A very fast FNV hash function for MySQL

I wrote a User-Defined Function that implements the FNV (Fowler-Voll-No) hash function for MySQL. I’m not the first person to do this — in fact, I was inspired by the Google patches for MySQL. But my implementation is a little bit different from most, in a very important way that leads directly to much higher performance, especially suited for the Maatkit tools.

A bit of background: FNV hashing is a very fast hash algorithm that operates in fixed memory. It is widely used in lots of important areas in computer science. My implementation requires absolutely no malloc() calls, which is a darn good thing because I am not to be trusted with malloc(), having spent too …

[Read more]
Send your employees to the MySQL Conference

A lot of people contact me asking if I’m looking for a job. (I have an unanswered email in my inbox right now.) People are looking desperately for qualified, knowledgeable MySQL professionals. There’s a critical shortage of people who can admin MySQL moderately well, much less at the guru level.

If you are one of the many who are trying to hire a MySQL DBA, you should send your employees to the MySQL Conference and Expo. Not just this year — every year. Train a smart person instead of trying to hire someone who’s ready to go now.

This is the unfortunate reality: MySQL’s popularity has caused demand to far exceed supply. That’s what happens when a great disruptive innovation takes hold.

What do you do in the meantime?

If you just need a little help, hire a part-time DBA and get some consulting help. Without endorsing them directly, may I suggest …

[Read more]
How to sync tables in master-master MySQL replication

Suppose you have a master-master replication setup, and you know one of the tables has the wrong data. How do you re-sync it with the other server?

Warning: don’t just use any tool for this job! You may destroy your good copy of the data.

If your table is large, you’ll probably want to use a tool that can smartly find the differences in a very large dataset, and fix only the rows that need to be fixed. There are several tools that are either able to do this, or claim to be able to do this. However, most of them are not replication-aware, and are likely to either break replication or destroy data.

To see why this is, let’s look at a typical scenario. You have server1 and server2 set up as co-masters. On server1, your copy of sakila.film has correct data. On server2, somehow you are missing a row in that table. A hypothetical sync tool will compare the two copies of the data and find …

[Read more]
don’t ask too many questions

chyrp is a nice looking piece of blog software. individual posts can have different styles, something it borrowed from the hosted tumblr service. i was interested to read about “the sql query massacre of january 19th, 2008” but the numbers gave me pause — 21 queries to generate the index page? that is down from an astounding 116, but that still seems ridiculous to me.

the number of queries to generate the index of this site? two. one of them is SET NAMES utf8. i could see boosting that to three or four if i moved some things like the list of links in the sidebar into the database, or added archive links. call it five if i had user accounts.

but right now, the number of queries used to load the index page …

[Read more]
Remember to sign up for MySQL Conference and Expo!

You have only a few more days to sign up for the MySQL Conference and Expo before the early-bird discount goes away. Check out the schedule of speakers and tutorials, and sign up soon! And just in case you didn't get one from any of the other people blogging about it, you can email me for a code that's good for a 20% discount.

I'm presenting two sessions: one on the query cache, and one on EXPLAIN. Both are manageable for an hour-or-so talk. I'm not trying to boil the ocean, but rather to help you understand these important topics in ways you'll remember after leaving the conference.

I was also on the voting committee for the proposals, so I've read them all. I really believe this event is worth every penny. (Of course, as a speaker, it doesn't cost me... but I digress).

While …

[Read more]
Henceforth, I dub thee GLAMP

I've decided to start replacing L with GL in acronyms where L supposedly stands for Linux.

I'm not a big user of acronyms, because I think they are exclusionist and they obscure, rather than revealing. (This wouldn't matter if I wrote for people who already knew what I meant and agreed with me, but that's a waste of time). However, LAMP is one that I've probably used a few times, without thinking that it is supposed to stand for Linux, Apache, MySQL, and PHP/Perl/Python. In fact, it doesn't refer to Linux, it refers to GNU/Linux. Therefore, it should be GLAMP.

Why does this matter? I try not to say Linux, unless I'm referring to a kernel, because a kernel is not an operating system. I try to be pretty careful about saying GNU/Linux when I'm talking about an operating system. An exception is a recruiting event yesterday at the University of …

[Read more]
INFORMATION_SCHEMA Support in MySQL, PostgreSQL

I've known about the INFORMATION_SCHEMA views (or system tables) in SQL Server for a while, but I just leared recently that they are actually part of the SQL-92 standard and supported on other database platforms.

The INFORMATION_SCHEMA views provide meta data information about the tables, columns, and other parts of your database. Because the structure of these tables are standardized you can write SQL statements that work on various database platforms.

For example suppose you want to return a resultset with a list of all columns in a table called employees

SELECT table_name, column_name, is_nullable, data_type, character_maximum_length
FROM INFORMATION_SCHEMA.Columns
WHERE table_name = 'employees'

Quite a handy feature, but it's hard to find what versions the of various database platforms started supporting this feature, here's a quick list:

  • Microsoft …
[Read more]
Showing entries 941 to 950 of 1184
« 10 Newer Entries | 10 Older Entries »