My summarizing and opining post discussing MySQL founder Michael Widenius’ protest of the Sun purchase by Oracle prompted a response from none other than Monty himself. Hit the comments to see what he has to say about my response, which was definitely net-negative in the final analysis. I have responded in the comments of that [...]
Read MorePosts tagged "mysql"
Select a single dataset across multiple tables
Say you’ve got two tables with the same structural layout but contain logically different information. A common example would be storing “deleted” records in a separate table to reduce table sizes, simplify queries, and improve performance. A record only exists in one of the two tables, either it’s deleted or it’s not. But sometimes you [...]
Read More coding theory, mysql, optimizationArchive your entire Twitter timeline
My code for displaying Twitter posts on your site is pretty handy, but it does have drawbacks. Each page load involves calling a remote URL, downloading a resulting XML file, and parsing the results, increasing your load times and using bandwidth. To minimize the impact, you can really only display a handful of the most [...]
Read More database, fwdvault, lifestream, mysql, open source, seo, social networking, TwitterFormat a RFC2822 date for mysql datetime fields
I was crash-coursing myself on PHP’s IMAP functionality recently, one of the first questions I came across was how I might store the date from an e-mail header in a MySQL DATETIME field. I was afraid I was going to have to parse out the string using a bunch of calls to substr(), but then [...]
Read More mysql, php, programming, standardsAutomating SSH or SFTP in scripts
Recently I needed to automate copying a MySQL database to a backup server. We keep a copy of our site and DB on this box in the event that our main systems go down, or there’s a problem with our internet connection. It’s kind of like a poor man’s colocation setup. I actually prefer the [...]
Read More mysql, programming, securityUsing SQL computations in WHERE clause
When writing SQL statements, sometimes I want to filter the result set based on a value that must be computed out of the stored data. Here’s an example: I want to see which widgets have been sold more than once, and how many times each of those remaining widgets have sold. Obviously we could pass [...]
Read More mysql, programming