Debugging bottlenecks with the MySQL Query Profiler

I was throughly pleased to discover the MySQL Query Profiler facility recently. Somehow I hadn’t heard about it (or recalled anyway) until now. In short it provides a very easy way to view how much time (down to the microsecond) a query takes as it goes through each step from request to the return of data. You can quickly spot whether the bottleneck making that one query so slow is that it has to write a temp table to disk or that an overly large and unused dataset has to be sorted. This is quite a timesaver for many situations, and it’s an amazingly handy tool to have around. If you’ve been a bit uncertain trying to optimize from the results of EXPLAIN, this is especially a great tool to try.
Continue reading

Posted in MySQL | Tagged , , | 2 Comments

Improved random password generator script

[EDIT, 2010-11-10:] After being kindly corrected by Chris Jones, I recommend instead using a readily available utility that is more feature rich to boot: pwgen.[/EDIT]
Continue reading

Posted in CLI | Tagged , , | 2 Comments

Get Flash working on Ubuntu 64-bit

If you use Ubuntu, and you happen to like to visit more than a handful of webpages, you might have encountered an issue or two with Flash. If you aren’t sure if Flash is working properly on your machine, check the Adobe test page out. I’ve had some machines with few or no issues at all, while on others Flash has been partially or fully broken quite often. I then end up going down the dank rabbit hole of switching out packages and versions (which is the last thing I want to be doing when I planned on watching Family Guy on Hulu), perhaps finding a solution, perhaps not. This got especially bad when Adobe decided not to release a new version of Linux Flash for 64-bit systems.

That’s why this forum post made me one happy penguin. The steps are simple, and they work. I’ve mashed them all into this one script to make it more convenient:
Continue reading

Posted in Desktop | Tagged , , | 3 Comments

Mobile broadband on Ubuntu

Ok, so I just can’t resist colons in titles: Trivially easy! I started the task of connecting a Verizon Wireless mobile broadband USB stick (model u727) to my Ubuntu laptop with some dread today. I had such low hopes that I didn’t even bother checking the actual network menu in my system tray icons. I just started Googling away, assuming there would be sudo commands and config file editing involved.

But lo! and behold! It’s actually way easier than that. Once I plugged in the USB stick a new option appeared in the network drop-down:

With jaw agape, I clicked the addition (which initially is a checkbox beside New Mobile Broadband Connection) and walked through a short wizard. This guide explains that in more detail.

After that was complete I was online, getting speeds upward of 1.2 Mbps download and .4 Mbps upload.

Posted in Uncategorized | Tagged | Leave a comment

Excel web query URLs with dynamic parameters

Last year I wrote about the ease and utility of pulling data into Excel via web queries. This mechanism has served me well in the interim and has proven to be an effective tool in collecting data for certain kinds of analysis. It’s not suited for every application, but if the data you are interested in consists of thousands to tens of thousands of rows, it’s a simple and workable option.

In a recent effort to pull data into an Excel spreadsheet for further analysis, I needed more flexibility than a static report URL could provide. The back end could accept parameterized values (e.g. the desired date range) in the report URLs. I just needed to be able to set these values (initially or through user input) from within the spreadsheet, then request the needed data. Seems generally simple and useful enough, so I’ll share what I did.
Continue reading

Posted in Dataviz, Desktop, Reporting | Tagged , , , | 4 Comments