Showing entries 1241 to 1250 of 1336
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: Linux (reset)
Portable Sequence Generation with MySQL

Today I needed the ability to create a Oracle-style sequence generator outside of the normal MySQL auto-increment functionality.

I was performing a table format upgrade and one column needed a unique index and we’re not using auto-increment on this table.

This little bit of SQL should work fine:

SELECT @sequence:=IFNULL( @sequence + 1, 1 );

You’d have to use this construct with INSERT INTO ... SELECT constructs.

So for example:


CREATE TABLE TEST_SOURCE
(
ID BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
PRIMARY KEY(ID));

INSERT INTO TEST_SOURCE (ID)
VALUES (NULL), (NULL), (NULL), (NULL), (NULL), (NULL);

… will give us a TEST_SOURCE table with 6 auto-increment values.


mysql> SELECT * FROM …

[Read more]
My MySQL Top 5 Wishlist

OK. First off. I broke the rules. There are actually seven here.

I figure Marten, Jay and Stewart can’t be wrong.

… so here it goes.

* Smarter InnoDB checkpointing. The fuzzy checkpointing seems less than ideal. I think you could just fill up memory with data pool modifications and then checkpoint every 3-5 minutes or so writing the entire DB out to disk in one head pass. You’d be able to fully saturate the disks in this manner. Granted faster is better but our 100MBps drives only see 15-30MBps in practice.

You’d need copy on write semantics though so if you’re seeing full …

[Read more]
The Benefits of Using Proven Technology

I’ve noticed that in the last five years I’ve started to become very conservative about adopting new technologies.

We’re JUST now migrating to Opterons for example. I’m only now considering adopting Java 5.0.

My stack is essentially Java 1.4.2, MySQL 4.1.22, Debian 3.1 (migrating to Etch), and Athlon processors.

There just aren’t any surprises. The entire stack works and everything is a known entity. Since I have a pretty stable foundation I can look at technologies one at a time without fundamentally changing the stability of the entire system. Java 5.0 looks interesting but no real pressure here at the moment.

MySQL 5.1’s partitioning support will probably be the only feature that pushes us to upgrade. There are some InnoDB fixes I want to incorporate as well.

OpenBSD, Linux, and Free - As in Air

I really like this thread:

“OpenBSD is free as in air,” Theo de Raadt [interview] stated in a recent thread on the OpenBSD -misc mailing list. The discussion began with a note that the Open Sound System [story] had recently been “open sourced” under the GPLv2 and CDDL leading Theo to comment, “noone cares about being Open and Free anymore. They just care about being called Open and Free, and how convenient — a bunch of laywers generated an organization that will label then Open and Free when they are not in fact so.”

This is an interesting statement.

The GPL and BSD licensing camps have always had a core fundamental difference in theory. If GPL is copy-left and Microsoft is copyright then the BSD is copy-center.

What’s nice about the BSD license is that there’s NO complexity. You can turn around and sell the code if you want to and just …

[Read more]
Turbocharging MySQL?s Marketing Engine

The other day I criticized MySQL for using somewhat cheap marketing tactics on Planet MySQL.

Obviously I’m a MySQL fan so instead of just criticizing I figured I’d offer some constructive ideas (a patch basically) to fix the problem.

Instead of preaching to the community they should become a leader in the MySQL blogosphere.

MySQL does a great job here at the source code level but they’re using marketing 1.0 tactics which just won’t work with sophisticated customers anymore.

They just don’t really participate in the blogosphere much and I think it’s hurting them. For example, Marten Mickos doesn’t appear to have a blog. Nor is there an …

[Read more]
MySQL?s Cheap Marketing Stunt?

I sort of agree with Jeremy Cole. This new marketing push using Planet MySQL seems like a cheap advertising stunt.

First, what’s with the highlighted post? Why is it highlighted? Seems like and advertisment.

Which brings up a number of significant questions:

1. Where’s my cut? I write content that’s pushed to Planet MySQL which wouldn’t be attractive for running ads if it wasn’t a collection Plof intelligent authors writing about MySQL.

2. Can competitors run ads on Planet MySQL? Can Oracle run an ad on INNODB? Can Solid run an ad?

Planet MySQL is a community oriented site. Seems like we should keep it that way.

[Read more]
RAID is dying?

There is a bunch of posts on Planet MySQL this week about RAID.  This comment from Kevin Burton really kind of made me go “huh?”.

You?re thinking too low level. Who cares if the disk fails. The entire shard is setup for high availability. Each server is redundant with 1-2 other boxes (depends on the number of replicas). If you have automated master promotion you?ll never notice any downtime. All the disks can fail in the server and a slave will be promoted to a new master.

Monitoring then catches that you have a failed server and you have operations repair it and put it back into production as a new slave.

Someone has to think low level.  The key phrase in there is  you have operations repair it and put it back into production as a …

[Read more]
Yes Jeremy, RAID Really Is Dying

Jeremy retorts that RAID is alive and well in the real world:

Kevin Burton wrote a sort-of-reply to my call for action in getting LSI to open source their CLI tool for the LSI MegaRAID SAS aka Dell PERC 5/i, where he asserted that ?RAID is dying?. I?d like to assert otherwise. In my world, RAID is quite alive and well. Why?

I should note that I said:

I?d like to assert that in 3-5 years RAID will be a thing of the past.

I’m not saying it’s dead now - but I do think it’s dying.

RAID is cheap. Contrary to popular opinion, RAID isn?t really that expensive. The controller is cheap (only $299 for Dell?s PERC 5/i, with BBWC, if you pay full retail).

… that’s the price of one HDD. You’ve just lost some IO there. Granted this isn’t a major issue but it all ads …

[Read more]
Five months with MySQL Cluster

So, the whole world changed at dealnews when Yahoo! linked us. We realized that our current infrastructure was not scaling very well. We had to make a change.

The Problem

Even though we were using all sorts of cool techniques, the server architecture was really still just a bunch of web servers all serving the same content. In addition to that, our existing systems as the time used a pull method. When a request came in, memcache was checked, if the data was not there, it was fetched from our main MySQL server. So, when there is no data in the cache or when it expires, this was very bad. Like when Yahoo! hit us. Some cache item would expire and 60,000 users would hit a page and each page would try and create the cache item.

The Solution

I …

[Read more]
MySQL and the The Death of RAID

RAID is dying. Shocked? The prediction might be a bit early for some folks. It’s still somewhat conventional for some people to think that RAID is a conservative way to scale your IO.

I’d like to assert that in 3-5 years RAID will be a thing of the past.

Want some evidence? Google doesn’t use RAID. They’ve build a database infrastructure which avoids expensive and proprietary hardware controllers.

You could call it a redundant array of inexpensive servers.

Other scale out shops which don’t have access to such toys have built out sharded MySQL installations. LiveJournal, Flickr, Facebook. These shops are using RAID in some situations but they …

[Read more]
Showing entries 1241 to 1250 of 1336
« 10 Newer Entries | 10 Older Entries »