Friday, May 01, 2009

Things I've Learned This Week

Just a few of the items I've learned this week...

  • There's a standard hacker logo - hacker emblem. Included is an explanation behind it. I'm almost tempted to add it to the site.
  • There's an entire site dedicated to the practice of sleeping in airports. Why waste the money on a hotel room. And this site isn't new - it's been around for 13 years. For the record, Singapore has the top airport in the bunch.
  • MySQL views continue to be a thorn in my side. Specifically, they have awful performance when you start joining them together. What I learned today is that you can replace a bunch of views with nested subqueries in the FROM clause. In other words, you can create a virtual table form a result set, as in:
      FROM (SELECT SUM(amount) AS total FROM foo GROUP BY date) AS x,
           (SELECT SUM(amount) AS total FROM bar GROUP BY date) AS y
    (or something like that - sorry for the contrived example). Performance wise, MySQL does well with the subqueries, even if they are horrendously ugly to code. Dang I miss Postgresq Views

What an educational week it's been.

No comments:

Post a Comment