MySQL Query Cache: still waiting for duplicate query checking

Way, way back in 2005 (4 years and counting) I finally reported a bug into the then MySQL 5.0 about an issue I was seeing (often) on high volume sites where a single query, if not in the query cache, but spawned from two (or more) simultaneous threads would both be executed in full; this is instead of one execution, and then the query cache being populated.

Reference: Bug 15044, and WorkLog 1293.

I had been seeing this for… well, years before hand, but considered it to be “just me”. Since I filed that bug, others have come forward and said they have seen the same issue.

Now, with the Oracle/Sun merge, and Sun having shelled out to “purchase” MySQL, we see a miraculous MySQL 5.4 being drafted together. Its good; but it appears to be a simple crowd pleaser that should have happened years ago – integrate in some very popular performance improvements (notably from Google’s code repository). If code is being contributed, and it works, why wasn’t this done earlier? And if not earlier, why now? Smokescreen? Last ditch effort before the project is canned by its new owner? Of course, this has been circulating for a while; I’m not posting this later after that’s been in the news for a few weeks now.

What is interesting is the “Refactoring MySQL” project being discussed. Where does this leave MySQL 6 – a little abandoned from here. And then with MariaDB and Drizzle now forked and picking up attention (external to MySQL/Sun/Oracle), it seems the entire thing is just becoming a mess. Drizzel is supposed to be the performance version – but with the google patches being integrated, perhaps the core MySQL branded project is catching up?

What’s looking clearer is: Postgres. From my perspective, its worse for MySQL in Debian. Lenny (stable now) has MySQL 5.0. The Experimental repo has 5.1 (5.1.34), but this hasn’t even transitioned to Unstable yet!

Here’s what I’d like to see:

  1. Someone picks up Bug 15044/WorkLog 1293.
  2. 5.4 goes STABLE from MySQL/Sun/Oracle real soon now, with or without my pet qcache bug/feature – it’s a big enough win for multi-core systems as it stands
  3. Debian moves MySQl 5.1 from experimental straight to Unstable – can the mysql-server-5.1 package can coexist with mysql-server-5.0?
  4. Debian also adds, along side the MySQl 5.0 and 5.1 servers, the 5.4 into Unstable, and 6.0 into Experimental.

Asus, where is the B204 w/Linux?

Dear Asus (pron: “a-sue-s”, not “ace-us”, apparently),

I’ve been looking for a small set-top home media player running Linux, with an HDMI on board, capable of running 1080p video. Looking around I’m quite fond of the Eeebox B204, but I don’t want to pay for MS Windows. I like the Bluetooth for my remote keyboard/mouse/input, and the battery UPS is cute up until the point the battery has lost its ability to charge/discharge.

I wanted to email you, but your asus.com web site has telephone numbers only. Its been a long, long time for you to bring this product to market in the UK. You’re also reselling different models in different markets, and your branding of the models is somewhat confusing: the B204 is “better/higher spec” than the B206 that was released at the same time?

Having said that, the on-line retailers I am Google-Frugal-Shopping searching through all seem to list the product, but have zero stock. Are there supply line issues? Is the product recalled? Or is it selling really well? Where are the Linux versions (sans-Microsoft-tax)? And why is your UK channel selling these at a considerable mark-up compared to the US retail prices? Currency does fluctuate, but I’m sure that UK£ and US$ are not on parity…. yet.

Sincerely,
JEB

MySQL views versus tables

An annoyance: at work we’ve been using MySQL 5.0.x for a reasonably high volume service. We recently swapped a table we were using from MyISAM, to a view containing several normalised MyISAM tables. Despite having indexes to make the joins in the table efficient, it seems that a SQL query with a “NOT IN (x, y, z)” style WHERE clause performs so much worse than the non-normalised original MyISAM table. So while a view may look equivalent to the original table, it won’t perform the same for all queries.

EasyCAP 4 channel input USB Video Capture

Video capture card; a gotcha

Once again, life proves when it comes to commercial offerings, you get what you pay for.

I found a £13 (~US$20) USB device with 4 composite video inputs, and one audio input, called an EasyCAP 4 channel device, on Amazon. I was planning on streaming 4 video captures from it at some quality. The unit turned up very efficiently, and emblazoned across the stick is “4 CHUSB DVR”, and a neat little Win32 utility called Multiviewer 2.0, by Zhong Kai Ran.

Fire up the software and an impressive 4-screen display is shown, however, its not until you plug in a video camera to one input that you can see that the device rotates through each of the video inputs; it doesnt appear to be able to stream all four simultaneously. A pity. So, if you’re looking for a “poor man’s multi-camera CCTV”, this is a very good choice, but be aware that you’ll only get (configurable) number of seconds from each channel in sequence (or selectable) but not a live continuous stream of all four inputs.

At least, that’s my experience under MS Windows thus far. I haven’t yet thrown it at a Linux system yet to see if it detects the device and/or it works any differently, but I’d suspect not.

Either way, it’s a start at what I’m looking to do anyway, so I am not too disappointed.

Next up, a small PC to house it in that I can run my GStreamer video processing on… hmmm… I want an Asus Eee Box B204 with its cute built in HDMI… its flirting with me promising Full-HD 1080p, but I guess if/when I have a spare £300 to play with I may find its also a little short!