Recently I had to deal with one task which required to do two
sets intersection. For example, if we have set A = {a, b,
c} and set B = {b, c, d} the result should be set
C = {b, c}. So the question was how do we do that with
MySQL. My little investigation and few minutes of googling showed
that there is no special command for set intersection in MySQL
(like INTERSECT) or set difference, although there is
one for set union (UNION. Now how come that there is one
for union, bot none for other set operations. Unions are
used more often?!). Instead, there is some tricky workaround using different kinds of
JOINs.
Now for my task, I had one simple table words shown
below:
-------------------------
word_field \\ link_field
-------------------------
a \\ link1 …
As some of you would have recently noticed, I’ve started playing around (I can’t really say using, seeing that its still not a daily basis kind of thing for me yet) with OpenSolaris and NetBeans. Now, Sun is encouraging students to use, review, and blog about these two great products - check out the student reviews contests.
If you’ve not tried OpenSolaris 2008.05, you should probably give it a twirl. Sure, I’ve not installed it on bare metal hardware yet (I’ve been travelling so much, I’m not anywhere near machines), but it works fine inside VirtualBox. NetBeans is great if you’re writing Java, Ruby, PHP, and are connecting to a database - Connector/J for MySQL …
[Read more]
Quick link: register for Designing and Implementing Scalable Applications
with Memcached and MySQL webinar (June 29)
Ever since its introduction, memcached
has been changing the way cost-efficient caching is perceived.
Some passionately love it, others cynically hate it.
Today, many large scale web 2.0
properties (including my employer) save millions of dollars by
depending on memcached to bring their application response time
under control and to offload pressure from databases.
There are several success stories about …
Startups are pretty fascinating. I work for a startup, and one of my good friends works for another startup. I’ve also worked for 2 other startups, one during the first “bubble”, and another one a few years later. Oh my, how the world of web startups has changed in that time!
1999: You must have funding
The first startup I was ever involved in was a web startup. It was an online retailer. They were starting from nothing. My friend (a former coworker from an earlier job) had saved for years to get this idea off the ground. He was able to get a few servers, some PCs for the developers he hired, and he got the cheapest office space in all of NYC (but it still managed to be a really cool space, in a way that only NYC can pull off), and he hosted every single service required to run the web site in-house. If I recall correctly, he had a web and database server on one machine, and I believe the primary DNS server was on an old …
[Read more]A while ago I wrote about how to make MySQL replication reliable, part of which is to eliminate temporary tables. The idea is this: if a slave is stopped (or crashed) while a temporary table is open and is then restarted, the temporary table doesn't exist anymore, and the slave will have problems trying to replay any further statements that refer to these tables. Thus, I claimed, there's no alternative but to eliminate temporary tables. This problem may not exist for row-based replication in MySQL 5.1 and later, but most installations I know of are using statement-based replication, even on MySQL 5.1
This is a contentious topic. People love their temporary tables and will ask hopefully "are you sure this isn't safe?" They'll …
[Read more]There’s been talk over the years of better monitoring for NDB (MySQL Cluster). This has been dubiously named NDB$INFO, after some special magical naming convention for tables holding information on the insides of NDB. Otherwise known as Worklog 3363 (viewable on MySQL Forge).
The basic idea is to get a bunch of things that are already known inside NDB available through a rather standard interface (SQL is preferred).
My top examples are “How much DataMemory is used?” and “Do I need to increase MaxNoOf(Tables|Attributes|ConcurrentTransactions)?”. You can get some of this information now either through the management client (ndb_mgm -e “all report MemoryUsage”) or the …
[Read more]|
MySQL University is a set of public lessons held by experienced MySQL developers, to spread technical knowledge inside and outside the company. It's like a conference session, except for the physical presence. There is no traveling involved. No hotel rooms to book and restaurant bills to pay. The lessons are given over the internet, using an audio stream for the exposition, and IRC for questions from the audience. If you want to attend, check the instructions for attendees and mark your calendars: |
Thursday, May 29th, at …
[Read more]So after a ever so temporary but loud moment of insanity[1] having a decision made which I very strongly disagreed with (wanting to release online encrypted backup as closed source), we’re back in the world of freedom and the MySQL Server is (and will be) free and open source software (dual licensed, so you can buy a commercial license of the same thing).
[1] Addition (wanting to remove my use of the word): Marten (rightly) points out that although appreciating the new blog posts, he doesn’t appreciate having his decisions called insanity. He’s right. It’s the wrong way to put it. So, without wanting to censor or change history (instead preferring to illustrate my own stupidity and amazing ability to completely say the wrong thing every 6 months or so), I offer this clarification (that i have tried to express in about 3 drafts of blog posts, none of which have made the light of day as i was never …
[Read more]I flew back into Sydney on Sunday morning to give a tutorial at Sun’s Expanding Horizon’s summit. It was a half day tutorial on MySQL Cluster - so a shortened version of the one I’ve given at the MySQL User Conference for the past few years. I had about 15 attendees, all of which had done their homework (It probably help that they were pestered via phone :)
The tutorial went really well. It really helps when everybody has done the homework and already have Linux and MySQL Cluster installed. Everybody got up and running (we used mysql-test-run to start a cluster, not writing the config file from scratch, which made things happen a lot faster). Also got some good feedback - yay! We may even have some people look to deploy it after attending, always a plus.
I also gave a “Scaling MySQL” talk that was well attended. I didn’t talk at all about query optimisation, mysqld configuration tuning or stuff like that - instead …
[Read more]
Project: MySQL Forge RSS/Atom feeds
KEY ACCOMPLISHMENTS LAST WEEK
* Already subscribed to MySQL mailing lists (gsoc and
internal).
* Contacted my mentor and got instructions about how to set up a
local working copy.
* Read documentation about Bazaar, the version control
system
* Installed linux (Debian) on my PC, to make a local development
environment possible * Started looking at and playing with the
source code. * Registered a blog, http://gsoc-forge.blogspot.com/ where I will
publish the weekly reports and maybe more. * Installed a local
working copy of Forge on my system.
KEY TASKS THAT STALLED LAST WEEK
None....
KEY CONCERNS
My university classes haven't finished yet. Here in The
Netherlands we have classes until the end of June. So I have less
time available as I …