I have been working with MySQL replication for quite a while. I
have dealt with simple replication setups and I have experimented
with complex ones. Five years ago I wrote an article about advanced MySQL replication,
which was mostly a dream on what you could do with imagination
and skill, but the matter from that article is still not even
remotely ready for production. Yet, since that article, I have
been approached by dozens of people who wanted to know how to
make the multiple master dream become reality. To all of them, I
had to say, "sorry, this is just a proof of concept.Come back in
a few years, it may become possible". It still isn't.
Despite its latest great technological advance, MySQL native
replication is is very poor of topologies. What you can do with
MySQL native replication is master-to-slave (which also includes
relayed …
2011 seems to be a good year for both Google I/O and Apple’s WWDC. Google I/O sold out in 59 minutes and Apple’s WWDC sold out in under 10 hours. They’re both held at the Moscone Center and I guess the caps for attendance is usually set at about 4,000-5,000 attendees.
My only beef with this is that the rest of the world is forgotten. It’s only good for the developer sitting in North America (or a similar timezone). In fact folk that need to get corporate approval are probably also forgotten. Launching at 9 or 10am PST is past midnight in China and Singapore for example. Its even later in Japan. What about developers sitting in Sydney & Melbourne?
Google takes an open approach to this. They will have live streaming available and are organising extended events (which again, think about the timezones — they work if you’re all together in San …
[Read more]From Stack Overflow:
I have a query where I have a custom developed
UDF that is used to calculate whether or not
certain points are within a polygon (first query in
UNION
) or circular (second query in
UNION
) shape.
SELECT a.geo_boundary_id, … FROM geo_boundary_vertex a, … … GROUP BY a.geo_boundary_id UNION SELECT b.geo_boundary_id, … FROM geo_boundary b, … … GROUP BY b.geo_boundary_id
When I run an explain for the query I get filesort
for both queries within the UNION
.
Now, I can split the queries up and use the ORDER BY
NULL
trick to get rid of the filesort
however
when I attempt to add that to the end of a UNION
it
doesn't work.
How do I get rid of the …
[Read more]This is your Developer Week in Review, I'm Casey Kasem. Our first letter comes from a software developer in New England who writes, "Dear Casey. My wife just got accepted into the Experimental Psych doctoral program at UNH, and I'd like you to play something appropriate for the occasion." Well, going out especially for you, here's "I'll be Proofreading Your Papers for the Next Five Years, 'Cause I'll Never Split (Our Infinitive)" (Seriously, congratulations Bonnie!)
And you thought that Justin Bieber tickets were hard to score ...
What's the matter, pal? You say you had your heart set on going to Google I/O, but the tickets sold out in 59 minutes? Well, cheer up, because tickets went on sale this week for the Apple …
[Read more]From 18 hours to 3 seconds! Hot Column Addition and Deletion (HCAD) Overview
TokuDB v5.0 introduces several features that are new to the MySQL world. In this series of posts, we’re going to present some information on these features: what’s the feature, how does it work under the hood, and how do you get the most out of this feature in your MySQL setup.
Today we start with HCAD: Hot Column Addition and Deletion. Many users have had the experience of loading a bunch of data into a table and associated indexes, only to find that adding some columns or removing them would be useful. An
alter table X add column Y int default 0;
or the like takes a long time — hours or more — during which time the table is write locked, meaning no insertions/deletions/updates and no queries on the new column until the alter table is done. …
[Read more]
(This article is based on the work of my colleage Herald van der
Breggen. The "I" and "my" below refer to him)
At work, we have a large Perl application running to earn our
keep. To read data from MySQL into perl application, there are a
few ways to do that, and we wanted to compare performance of
these methods.
- HandlerSocket, a NoSQL interfaceus, using Net::HandlerSocket) (columns selectable)
- DBI, the standard Perl database interface (using DBD::mysql underneath) (columns selectable).
- HANDLER DBI, DBI queries, using HANDLER statements instead of SELECT statements. See HANDLER Syntax (full rows only).
- Class::DBI, an ORM …
This title is not nearly as snappy as Yeats' line from "The Second Coming," but it will have to do.
Conflict resolution has been a holy grail for us on Tungsten--we
had people asking for it when MySQL was still MySQL AB, lo these
many years ago. Well, it's finally starting to happen
after about a year of work.
Let's start with a simple multi-master configuration. To
replicate bi-directionally between two masters, you typically run
Tungsten replicator on each master with two replication services
on each master. The first local service reads the
master log. The second remote service is a
slave of the other master. It looks like the following
picture:
…
As Lee mentioned on the Drizzle blog, we have an upcoming Drizzle Developer Day just after the MySQL Conference and Expo. Sign up here to make sure we have enough space and can help with planning.
The last couple developer days have been great – helping people getting started with Drizzle, discussing improvements that could be made (both big and small), operations concerns and new to this one: a GA release.
Having a GA release out is really exciting, I’m hoping that on the developer day we get people …
[Read more]
Object oriented programming makes it all doable: Setting up a
base class for a connection object, and deriving child classes
for specific database vendors.
HeidiSQL now introduces experimental support for MS SQL in
r3735. How that works? Seamless:
- In the session manager, chose the new network type "MSSQL" and
specify the hostname, user and password. All other settings are
unused for MS SQL.
- As HeidiSQL allows to have multiple connections open at once,
you can of course connect to a MS SQL server and at the same time
to some MySQL server.
- Table data can already be edited (INSERT, UPDATE, DELETE)
- Structure editors like the table editor are highly incomplete
yet, just shows a part of the column definitions.
- Once all MySQL specific stuff is abstracted into the above
mentioned objects, you will be able to do an SQL export from …
Object oriented programming makes it all doable: Setting up a
base class for a connection object, and deriving child classes
for specific database vendors.
HeidiSQL now introduces experimental support for MS SQL in
r3735. How that works? Seamless:
- In the session manager, chose the new network type "MSSQL" and
specify the hostname, user and password. All other settings are
unused for MS SQL.
- As HeidiSQL allows to have multiple connections open at once,
you can of course connect to a MS SQL server and at the same time
to some MySQL server.
- Table data can already be edited (INSERT, UPDATE, DELETE)
- Structure editors like the table editor are highly incomplete
yet, just shows a part of the column definitions.
- Once all MySQL specific stuff is abstracted into the above
mentioned objects, you will be able to do an SQL …