Category » WordPress

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.

Get WordPress user_id from meta_key meta_value pair

Get WordPress user_id from meta_key meta_value pair

Get a WordPress users id from meta_key and meta_value [...] Read More

JellyTelly

JellyTelly

Every now and then I get to work on a project that I’m supper excited about, and JellyTelly worked it’s way to the top in heartbeat! Smooth, Clean and Easy! I’ve never had something with this much depth be made so simple.

If you have kids and don’t mind messy fingers touching your keyboard, screen and touchpad then you’re in luck! You should definitely go and check out some of the videos, games, crafts and their [...] Read More

Web Hosting for WordPress

Web Hosting for WordPress

Over the last 3 years I’ve been all over the map for hosting, and have seen quite a bit. However there are a few that I really want to check out but haven’t been able to yet. MediaTemple and Rackspace are two I really want try. I’ve been asked a number of times who I recommend or who I use and so I thought I would put it here for those of you who may [...] Read More

Parent Theme VC

Parent Theme VC

Prepended update 10-17-11 v3.5.3 https://github.com/vc27/ParentTheme_VC

Original Post
For the last 3yrs I’ve been working on a single theme framework I call ParentTheme_VC. I completed my last update at version 3.4.3 and am now at the level where I can truly use my theme as a framework. I recently updated this site using my latest version and I’m rather satisfied with the results :)

I’m not close to a public release yet, but honestly there are so many well [...] Read More

WPNashville - The Nashville WordPress Community

WPNashville – The Nashville WordPress Community

WPNashville is here and it’s for you the Nashville WordPress Community! At this point we are flying under the radar hoping to catch all the bugs and grammar checks. We are also hoping correct anything that may not comply with the WordPress standards. Please, go and read click around and let us know if there is anything you would do better or different. We at WPNashville are trying to support and encourage the Nashville WordPress [...] Read More

VC WordPress Theming

VC WordPress Theming

I’ve been developing with WordPress for about 2.5 yrs and this morning I really wanted to write something about all the work that I do, but am realizing that I just don’t know what to say with out writing a freaking book on the DevTime of WordPress. Not to mention there are so many people out there who have already laid down the law on what WordPress is.

So to curb my need to publish I [...] Read More

My Recent Work

My Recent Work

I’ve been on the keyboard for the last 3.5 months and it’s been quite a crazy time. So far 2010 has been more busy then I ever expected. My recent work has been expanding my theme by leaps and bounds. It’s odd that every site I build kills all the previous ones. (it’s almost time to update my site, I just wish I had some time :)

There is a lot to go over so I’ll [...] Read More

I want the Box of WordPress Legos!!

I think one of the most frequently asked questions I hear on a regular basis is; “Can WordPress Do That?” The answer is always the same…. Yes!!!

The best response to any question like that is, “Who’s building it?” Honestly the question isn’t about weather or not “WordPress” can do something or not. Sure “out of the Box WP” can only do you so much. You add a dozen good plugins, a standard theme and you’ll [...] Read More

VC-Easter

I was sitting on my bed working on a project when I realized it’s about time I freshened things up a bit around here and added a little more season to things here in my VisualComa. So here you have it VC-Easter with my own special Easter Background.

If you’re not seeing any change you’ll have to refresh your browser to see the change. If your on a slow connection than it may take a second [...] Read More