Missy Higgins and Ian McFeron at The Crocodile

Last night Kay and I went to The Crocodile Cafe to take in a show. We saw Missy Higgins and Ian McFeron. Overall, I give the show a good grade. Though I always give good grades to shows where I can hear what the singer is singing and the music doesn’t totally sound like ass.

First up was Ian McFeron, who played last year at Bumbershoot. He sounded a little bluesy and a little honkey tonk, but was fun to watch. I always enjoy someone on an acoustic guitar on stage who looks like they’re really enjoying putting on a show. His fiddle player, on the other hand, looked awkward and uncomfortable. She had this smile on her face that said, “I have no fucking clue what I’m doing here. I thought learning to play the violin would land me a rich husband.”

After a brief intermission Missy Higgins came on. You could tell because all of the lesbian’s wallet chains were clanking with excitement. Seriously, the minute this girl started playing the piano every short haired Emo girl in the place let out a sigh. Her Wikipedia entry says her music has been described as “bland and underproduced” and I couldn’t agree more. She sounded fine, but she never really achieved full jamfest, which disappointed me a bit because it almost felt like she was holding back. Never the less, she did end up belting out a few good songs.

As a side note, I drank some Flat Tire beer that that tasted like it had been laced with farts. Seriously, I don’t remember Flat Tire tasting that bad. Luckily, they had New Castle so I was able to clear my palate (as a side note to my side note, I had to Google the correct spelling of palate/pallete/pallet).

Fremont 5k Fun Run

The gang

This last Friday I ran my first 5k with a time around 27:40 0:27:29.0 (I can’t seem to find my official time anywhere online I placed 272nd out of a field of 345 or 66th out of 75 for my division). Not too shabby considering I hadn’t ran 3.2 miles in forever and that I rode my bike a bit over 4 miles to get to the race, which wasn’t my wisest decision as of late.

At any rate, the run felt great and we had a great time at Norm’s after the race. Maybe by the end of the summer I’ll do something crazy like a half marathon or a sprint triathlon.

Novara Express

Novara Express

You’re looking at my new wheels. I decided to finally break down and get a bike because I didn’t have anything else better to do during the summer and I’m looking to explore Seattle in a bit more intimate setting. I’m also getting this insane idea that it might be fun to participate in a sprint triathlon or longer rides like the Seattle to Portland ride.

I was looking into getting the Cannondale Bad Boy Disc, but ended up going this route for a number of reasons. The Express came with handle bar extenders, a carbon fiber fork and shifters that I considered easier to maneuver than the BBD’s. I took it out for a spin a few days ago and did about 12 miles in Beacon Hill and Madrona. Good times.

All your life are belong to the Intarweb

I’ve been thinking about the Internet and, especially, craigslist lately. Since moving out to Seattle I’ve relied heavily on both to form new friendships and find new things to do. This is a brief list of how the internet has affected my life recently.

  • The whole reason I moved to Seattle was because I met Brad, the proprietor of eNotes.com, LLC found me via an article I wrote.
  • My closest friends in Seattle are Garren, John and Andrew were all met in one way or another through craigslist.
  • I’ve disc golfed, snowboarded, ran, walked, talked and drank with numerous people I’ve met from craigslist.
  • I’ve gone on a few dates from craigslist. I won’t bore you with the details, but let’s just say dating in Seattle sucks.
  • I’m going to Sasquatch with a girl who just moved here from Florida and was looking for a ride.

It’s really staggering now that I think about it. There isn’t a single person that I can think of that I interact with daily here in Seattle that I didn’t meet online somehow.

Hello? Is anybody paying attention?

I’ve been meaning to write up a few things about things that are currently going on in the news that absolutely shock me. Today I was tipped over the edge by news that Attorney General Alberto R. Gonzales says prosecuting journalists over leaks is a possibility.

  • Gonzales Says Prosecutions of Journalists Are Possible – I hope he plans on prosecuting Robert Novak first thing. The chilling effect and erosion to our first amendment rights if this comes to fruition is staggering and alarming.
  • Wired news publishes AT&T documents – The phone companies turned over your phone records to the NSA so the government could mine that data for suspicious activities without a warrant. In fact, they didn’t even bother to get a FISA warrant, which are handed out like candy. Fuck you, get a search warrant like the constitution tells you to do.
  • Some Republicans want to make crossing the border without papers a felony. Where the hell are we going to put these people? The prisons are so overcrowded that we regularly let convicted rapists and murderers out too early. This simply doesn’t make any sense.
  • Bush wants to use the National Guard to patrol the border. These are the same men and women are have spent months in Iraq away from their families. These are the same men and women that are trained to do the following: kill people, repair tanks, blow shit up, recover from national disasters. On top of it they’d be patrolling the border in 2-3 week shifts. I don’t know about you, but doesn’t it make more sense to, you know, hire real border personnel?

Does this make sense to anybody? Why aren’t people alarmed by the possibility of prosecuting journalists? Why aren’t we questioning stupid ideas like putting National Guardsmen on border patrol? Why aren’t we calling for the resignation and impeachment of a President that has repeatedly broken the law to spy on his fellow countrymen?

How about this one?

So Ian and I are walking from my place to Honey Hole to get some grub tonight when we see two guys walking in front of us. Both are pretty large rough looking banger type dudes. Both are wearing sweat pants and have their hats on backwards. One is wearing four sizes too small leopard print slippers.

I notice that both of them are checking out cars parked on the street and commenting about the cars to each other. At this point one of them walks up to an older Ford Taurus and kicks the tires and says to the other one, “This one looks like it’d be easy to take.” I think to myself, “There going to steal this fucking car!” Ian and I look at each other and start laughing because these two retards literally kicked the cars tires before contemplating stealing it in broad daylight.

Thoughts on MySQL UC

Ian and I ventured down to MySQL UC with one goal, which was to figure out a way to scale MySQL efficiently. Specifically, I was looking for a way to scale MySQL in a way that didn’t reduce feature sets and was transparent to my application. My second goal was to learn of ways to optimize MySQL and find out about new features of interest.

The answer to my first question simply; you can’t do that. MySQL offers two options for scaling out and high availability. One is replication, which is asynchronous and requires your application to know where to send reads, writes and “critical” reads. In other words, it’s not transparent to the application. The second option is clustering with NDB, which lacks foreign key constraints and comes with the suggestion that you avoid joins and denormalize your schemas to avoid joins. However, there is a glimmer of hope at the end of the tunnel, which is Continuent’s m/cluster solution, which was exactly what I was looking for. Unfortuantely, at $5k per socket per database node, it comes with a hefty price tag. They do have an open source version that only supports ANSI SQL though which I may look into.

One area which Ian and I have learned quite a bit while at MySQL UC is the abundance of new features in 5.0 and 5.1. Triggers, views, stored procedures and events are all finding their way into these versions. Ian and I have already discussed areas that we’ll be using triggers and stored procedures to create aggregate tables for caching purposes. We have a few areas that we’ll be using events in 5.1 as well.

Some other random thoughts …

  1. The lunches weren’t all that great. I wish I could opt out of the lunches, save some cash on that and buy my own.
  2. The weather in Seattle has been better than it has been in Santa Clara, which negates the purpose of having the conference in “sunny” California.
  3. In discussions with fellow attendees it’s become fairly evident that both Ian and myself are pushing the limits of PHP and MySQL far beyond what most people are doing. This makes it difficult to find people to turn to for help.
  4. There are a lot of people wearing SCAMP shirts. I can’t believe those dirty bastards have the guts to show up at a conference such as this.

As a side note to my non-techie friends, this is the last in a long string of wholly geek related entries. So, please, quit sending me email complaining about this.

ext/mysqli

  1. PHP5 comes with a new MySQL extension called mysqli. While the i stands for improved, interface and incompatible (some say incomplete – HA!).
  2. Supports MySQL versions starting with MySQL 4.1.
  3. The new function was basically a way to start over and clean things up to work with the new features in 4.1+.
  4. Includes SSL connections, stronger password algorithm, prepared statements prevent SQL injection, no default connection parameters. Overall, their goal was to make it safer.
  5. Can make use of new and more efficient MySQL binary protocol, prepared statements give massive performance improvements on large data sets, faster overall code, support for gzip compressed connections. Additionally, the MySQL server can be embedded into PHP (wtf?).
  6. You can use either OOP or procedural interfaces, prepared statements make certain operations easier and there’s less that can go wrong (which seems a bit ambiguous).
  7. Some redundant functions have been dropped, some new functions that support new features and persistent connections are no longer support (about damn time).
  8. The OOP interface is “marginally” slower than the procedural interface, but tiny compared to the cost of actually getting the data. In other words, use whichever you like.
  9. In PHP5, the OOP interface supports Exceptions (ie. ConnectException, etc.).
  10. Added autocommit(), commit() and rollback() functions to the OOP interface.
  11. Now supports multiple queries with the multi_query() function. This looks absurdly awkward. Not sure if I can even think of a reason to use this. This functionality was added specifically for stored procedures which can return multiple result sets.

Nevermind, Ian just noticed he’s reading the notes verbatim from the manual. That being said, this looks like an extremely interesting enhancement over the old MySQL client library. We’ll probably look into switching things over when we get back and start forming a larger MySQL strategy.

Wikipedia: cheap & exmplosive scaling with LAMP

  1. They’re now doing 3,500 page views per second and serving that off of about 100 servers.
  2. Wikipedia is LAMP (Linux, Apache, MySQL and PHP).
  3. They use 90% of memory in InnoDB buffer pool.
  4. This is laughable, their operational guideline is “general availability” as opposed to five nines. Their main operational goals are maximum efficiency and always be able to scale as people are always coming in. These are a direct result of them being a donation powered open source community site.
  5. They use aggregated tables for reports, which doubled overall performance. They also killed some metadata included on every page because it was too expensive to generate.

Overall, not very interesting. They don’t really tell how they’re scaling to that many requests with only 100 servers. I’ve found most of the short sessions missing any kind of meat as to exactly how these guys are scaling MySQL. The feeling I get is that most of them are doing exactly what I’ve been doing, which makes me rethink MySQL’s place in the “high performance” column of databases.

Speeding-up Queries: New Features of the MySQL 5.0 Query Engine (Part 1)

  1. Cost-based query optimization allows you to assign costs to operations and assign costs to partial plans, which allows them to find better search plans with lower costs.
  2. Possible because query plans are simple, they have data statistics and they have meta-data.
  3. Cost of an operation is proportional to disk accesses. A cost unit equals a random read of data page (4Kb).
  4. Variable length fields (BLOB, VARCHAR, etc.) require extra guess work and adds to the cost of that operation. I would assume this means variable length fields would be a bad idea when used in an index.
  5. MySQL does internal optimization on your queries to decide how it should do searches and joins based on the cost of each way to execute the query. Each choice is called a “plan” and each plan has a cost (see above).
  6. The problem with this approach is that the more joins you add the more plans (options) are added to the mix for optimization, which means that as you add joins the more time the “optimizer” takes to optimize your query. Evidently, this limit is somewhere around 5-7 joins in a single table.
  7. With 5.0 they’ve introduced a “Greedy search” that lets you suggest the plan, which is a trade off as the optimizer is skipped (at least this is how it sounds from his explanation).
  8. Users can influence the choice of indexes with the USE INDEX, FORCE INDEX and IGNORE INDEX sytnax. These should be used with extreme care as indexes can be added and dropped.
  9. You can also check out optimizer_search_depth whith tells the optimizer how much effort to put into looking for the best search plan. The default is automatic.
  10. Another option is optermizer_prune_level.
  11. The third way to force optimization on joins is to use the STRAIGHT_JOIN syntax to force join order.
  12. The range optimizer can detect ranges that can be merged, such as SELECT * FROM tb1 WHERE foo < 10 OR foo < 20. In doing so it finds the minimal sequence of smallest possible disjoint intervals.