Title: Database problems
Last modified: August 20, 2016

---

# Database problems

 *  [rsgrone](https://wordpress.org/support/users/rsgrone/)
 * (@rsgrone)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/database-problems-11/)
 * Formally, I was running WPMU, upgrade though the 3.X.X series to the current 
   3.2.1, and discovered an issue that only cropped up when I began using the new
   framework style themes… NOTE: I no longer run multi-site
 * I have articles posted for a little over two years…. Now, when the following 
   code is executed on the site, the entire site runs a query for about 3 minutes
   on the database then fails (500 error)…
 *     ```
       $count = 1;
       		$args = array(
       		  /* 'post__not_in'=>$do_not_duplicate, */
       		  'post_type' => 'any',
       		  'posts_per_page' => get_option('of_wn_nr15'),
       		  'meta_query' => array(
       		  'relation' => 'OR',
       ```
   
 * The issue is with the `'post_type' => 'any',` statement as the “joins” (I believe
   are the cause as, I read on another site that the statement for the query should
   refer to ‘Left’ for some reason)
 * Note: This is not a novice style post and hoping for an answer from one of the
   top dogs unless, someone has in fact had this same issue and repaired it…
 * What helped tremendously was replacing ‘any’ with ‘post’ with one MAJOR exception,
   when the site was very busy the CPU would max and of course, the site would crash…
 * The query searches through the database looking for videos as attachments…
 * Now, here is the catch… After literally days, including a few all nighters, I
   found that if I deleted all posts and comments prior to Aug. 2010 (more succinctly
   prior to July 13, 2010 when I did the 3.0 upgrade) that the query did in fact
   work correctly and located and posted the video’s in the proper locations…
 * Obviously, since this is a news site, I cannot just simply delete all the articles
   older than August 2010, and looking for anyone that could explain what may have
   changed in the code regarding the above between the upgrades so, that I can simply
   go into my db, and search and replace the issues…
 * I am using php 5.3, MySQL 5.5 (three separate servers running on three separate
   ports) and everything inclusive of the WP themes and installation are up to date…
 * The problem occurs with ALL the plugins disabled as well, I have troubleshot 
   all the obvious, and would happily post the link to the external forum where 
   we have been attempting to come up with a solution…
 * Please advise…

The topic ‘Database problems’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [rsgrone](https://wordpress.org/support/users/rsgrone/)
 * Last activity: [14 years, 7 months ago](https://wordpress.org/support/topic/database-problems-11/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
