Select Page
Pre Photo Journal

Pre Photo Journal

Last week I found a way to get my old harddrives connected, so there was much browsing to be done. I found exactly what I was expecting, old personal photos and my archive of scanned negatives.

In the middle of 2008 I bought a phone that had a usable camera and a way to send it to my computer with out spending 25 cense to email it. I’ve had a digital camera since 2001, but pulling out your camera and taking a picture is so different than just using your phone. (i could babble about this of a while), anyway… I don’t seem to have any photo records from beyond 2005, at least none I’ve found. They are probably on some cd hiding out in a closet.

The story continues, 2008 I started posting my photos to flickr in an attempt to put my photos on-line with out dealing with some custom gallery. I filled up my free 200 photos in about 2-3 months and decided to buy the pro package. Since 2008 I’ve uploaded over 2500 photos of random shit and daily life! The best part is, it’s for me, so it doesn’t have to be awesome. It’s a journal not a photographers journey, I’m not a photographer.

Here is a link to my Pre Photo Journal pics. Hope you enjoy some totally random crap. You’ll actually find more photos of people.

Wikiup Oregon 2007

WP_Query() :: meta_query vs post__in

WP_Query() :: meta_query vs post__in

Last month I found myself dealing with random outages on one of the sites that I manage. At first I was convinced it was the holidays, then I quickly realized that there was a single query casing this mayhem. After hours of sifting through error_logs and watching my terminal as the sql passed by I found my issue. Oddly enough it was coming from a totally legitimate query that I would have never guessed would be the culprit.

Please keep in mind that this type of query is not dangerous, but in the current situation it became dangerous.

The Scenario

I have two post_types that need to be cross referenced for a query. Looking back I should have used a hidden associative custom taxonomy. At the time I decided to use post_meta to store associative term_id’s, which worked out well due to the method of post creation. Pulling the query seemed simple enough, and the amount of data in the query array was actually rather small.

The Issue

The issue came from with in the processing of the meta_query. In the midst of processing this query there was a temporary copy of the data in order to pull the results. This temporary copy was casing a huge hangup and eventually the CPU% would spike and cause a db error.

The Solution

One solution to this issue was to change the type of query I was running. I decided to pull the post id’s first using $wpdb->get_results() then use post__in with WP_Query() to get the actual posts.